Use [] instead of charAt

Replace `charAt` calls with `[]`.
Index lookup is ~10% faster and saves a few bytes.