Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust into string

// You can convert a literal string (&str) into a String using the to_string function
// Here s is a String where s_literal is a &'static str
let s_literal = "String literal";
let s = s_literal.to_string();
 
PREVIOUS NEXT
Tagged: #rust #string
ADD COMMENT
Topic
Name
4+4 =