fix char_len warnings

https://github.com/rust-lang/rust/blob/3c60bc02ce6de2823d0b837f90d5db0077fce6f7/src/libcollections/str.rs#L1101