Black616Angel, 8 months ago And rust also has the “🤦”.chars().count() which returns 1. I would rather argue that rust should not have a simple len function for strings, but since str is only a byte slice it works that way. Also also the len function clearly states: This length is in bytes, not chars or graphemes. In other words, it might not be what a human considers the length of the string.
And rust also has the “🤦”.chars().count() which returns 1.
I would rather argue that rust should not have a simple len function for strings, but since str is only a byte slice it works that way.
Also also the len function clearly states:
This length is in bytes, not chars or graphemes. In other words, it might not be what a human considers the length of the string.