It's broken for strings with characters outside 7-bit ASCII, but it's broken in the same way as several existing functions (e.g. charAt()), so that's probably ok for now.