The Rust Programming Language Forum
`to_string()` vs `to_owned()` for string literals
help
vitalyd
March 6, 2017, 11:09pm
7
Not if you mentally read to_string as to_String
show post in topic
Related topics
Topic
Replies
Views
Activity
Current guidance on &str to String (to_owned vs to_string)
help
6
7836
May 17, 2022
What is the idiomatic way to convert &str to String?
help
11
69118
August 3, 2017
Owned String literal?
help
7
3114
December 1, 2016
Why use .to_string() when declaring a variable?
help
3
1655
January 27, 2022
Passing strings & ergonomics
help
5
289
April 3, 2025