Let's try mozilla's fixedCharAt function

master
Caleb Fontenot 2023-04-30 19:59:00 +07:00
parent 75cf85d418
commit 41611bc18c
1 changed files with 1 additions and 1 deletions

@ -217,7 +217,7 @@ function charIterate(input) {
let temp = input.split('');
for (let i = 0; i < stringLength; ++i) {
let compareString = temp.join("");
if (surrogatePairs.exec(input).index == i) {
if (surrogatePairs.exec(compareString).index == i) {
stringLength--;
console.log("Decreasing stringLength variable to", stringLength);
}