fix char_len warnings

https://github.com/rust-lang/rust/blob/3c60bc02ce6de2823d0b837f90d5db0077fce6f7/src/libcollections/str.rs#L1101
Merge pull request #481 from skv-headless/fix_char_len_warning

fix char_len warnings