Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUST

rust string to &str

let s: String = "abcdefg".to_owned();
let s_slice: &str = &s[..];  // take a full slice of the string
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #rust #string
ADD COMMENT
Topic
Name
8+1 =