DEV Community

Discussion on: Building a compiler – working on the tokenizer

Collapse
 
valeriavg profile image
Valeria

Accessing string characters by their index should be done with String.prototype.charAt to avoid UTF issues where string[idx] would return only part of the multibyte character.

Collapse
 
siddharthshyniben profile image
Siddharth

Hmm, nice suggestion.