Use `s.charAt(cur)` instead to avoid some temp objects from implicit conversion