Hacker News new | ask | show | jobs
by irq-1 27 days ago
Note on example of UTF-8 strings. It's counting " has " in the length. You can change it to:

    let l = text.len();
    text.push_str(" has ");
    text.push_usize(l);
1 comments

I’ll look into this