Jump to content

String matching: Difference between revisions

Line 2,787:
<lang rust>
fn main(){
let hello = String::from("Hello wordworld");
println!(" Start with \"he\" {} \n Ends with \"rd\" {}\n Contains \"wi\" {}",
hello.starts_with("He"),
hello.ends_with("rdld"),
hello.contains("wi"));
}</lang>
Line 2,796:
{{out}}
Start with "he" true
Ends with "rdld" true
Contains "wi" false
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.