Use `charCodeAt` instead of `charAt`

`charCodeAt` is faster in general.

Ref. #4.