2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
str
प्रायः इति गण्यते&str
ऋणं कृतवान् ।str
तथाString
सर्वे utf-8 एन्कोडेड् सन्ति ।let mut s = String::new()
let data = "initial contents";
let s = data.to_string();
let s = "initial contents".to_string();
let s = String::from("initial contents")
.let mut s = String::from("foo");
s.push_str("bar");
// s is foobar
push_str
विधिः स्ट्रिंग् इत्यस्य स्वामित्वं न परिवर्तयति
let mut s = String::from("lo");
s.push('l');
// s is lol
let s1 = String::from("Hello, ");
let s2 = String::from("world!");
let s3 = s1 + &s2; // note s1 has been moved here and can no longer be used
let s1 = String::from("tic");
let s2 = String::from("tac");
let s3 = String::from("toe");
let s = format!("{s1}-{s2}-{s3}");
Rust subscripting इत्यनेन स्ट्रिंग् इत्यस्य अन्तः व्यक्तिगतवर्णान् अभिगन्तुं न अनुमन्यते
for c in "Зд".chars() {
println!("{c}");
}