DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
8+1 =
Submit