Let's try mozilla's fixedCharAt function

master
Caleb Fontenot 2023-04-30 20:04:57 +07:00
parent 512ee8d11d
commit 81fd5b5c9b
1 changed files with 2 additions and 2 deletions

@ -218,8 +218,8 @@ function charIterate(input) {
for (let i = 0; i < stringLength; ++i) {
let compareString = temp.join("");
console.log(surrogatePairs.exec(compareString), compareString);
let eval = surrogatePairs.exec(compareString).index;
if (eval != null && eval == i) {
let stringEvalIndex = surrogatePairs.exec(compareString).index;
if (stringEvalIndex != null && stringEvalIndex == i) {
stringLength--;
console.log("Decreasing stringLength variable to", stringLength);
}