Home > Blockchain >  Is there a String#indexOf equivalent that counts code points (not code units)?
Is there a String#indexOf equivalent that counts code points (not code units)?

Time:10-28

Is there a String#indexOf equivalent that counts code points (not code units), or do you have to enumerate the string yourself using String.prototype[@@iterator] (eg using for...of)?

console.log('           
  • Related