use charCodeAt instead of charAt
Merge pull request #1230 from fundon/char-code-at

use charCodeAt instead of charAt