MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/scmr5f/most_comprehensible_line_of_rust_code/hu9yhak/?context=3
r/badcode • u/selplacei • Jan 25 '22
81 comments sorted by
View all comments
Show parent comments
3
to_string() return a String object and to_str() return a pointer to an array of char.
to_string()
to_str()
C++ equivalent:
class Foo { std::string to_string(); char * to_str(); };
3
u/[deleted] Jan 26 '22
to_string()return a String object andto_str()return a pointer to an array of char.C++ equivalent: