Let's try mozilla's fixedCharAt function

master
Caleb Fontenot 2023-04-30 20:00:51 +07:00
parent 9b30795909
commit 0d29908fcc
1 changed files with 2 additions and 1 deletions

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