Rust: You probably meant to use .chars().count()

  • Why is that what is meant? I am struggling to think of a situation where the number of characters is actually needed.

    What you get from this call is the number of Unicode code points, which doesn't reflect the number of "characters" using any common definition at all.

    I'm concerned that misinformed advice like this will lead to even more broken implementations of things like line breaking.