Length of string



examples/strings/length/src/main.rs
fn main() {
    let text = String::from("Hello World!");
    println!("{text}");

    let length = text.len();
    println!("{length}");

    let text = String::from("👻👽👾");
    println!("{text}");

    let length = text.len();
    println!("{length}");
}

Hello World!
12
👻👽👾
12