On 28/05/2014 15:13, Daniel Micay wrote:
On 28/05/14 10:07 AM, Benjamin Striegel wrote:
I think that the naming of `len` here is dangerously misleading. Naive
ASCII-users will be free to assume that this is counting codepoints
rather than bytes. I'd prefer the name `byte_len` in order to make the
behavior here explicit.
It doesn't need to exist at all, because `as_bytes().len()` is available.
Sure, but in that case many other things in libstd do not need to exist
either, they’re just there for convenience.
+1 to rename to .byte_len() or .utf8_len().
(See https://github.com/mozilla/rust/issues/14131 )
--
Simon Sapin
_______________________________________________
Rust-dev mailing list
Rust-dev@mozilla.org
https://mail.mozilla.org/listinfo/rust-dev