Closed samueltardieu closed 1 month ago
.len() already returns the length in bytes when used on a String or a str. As this might be counter-intuitive for beginners, I've also added an extra comment. This has the benefit of preparing them to a proper use of .len() on a string.
.len()
String
str
Thanks :)
.len()
already returns the length in bytes when used on aString
or astr
. As this might be counter-intuitive for beginners, I've also added an extra comment. This has the benefit of preparing them to a proper use of.len()
on a string.