Let's try mozilla's fixedCharAt function
This commit is contained in:
@@ -218,8 +218,8 @@ function charIterate(input) {
|
|||||||
for (let i = 0; i < stringLength; ++i) {
|
for (let i = 0; i < stringLength; ++i) {
|
||||||
let compareString = temp.join("");
|
let compareString = temp.join("");
|
||||||
console.log(surrogatePairs.exec(compareString), compareString);
|
console.log(surrogatePairs.exec(compareString), compareString);
|
||||||
let eval = surrogatePairs.exec(compareString).index;
|
let stringEvalIndex = surrogatePairs.exec(compareString).index;
|
||||||
if (eval != null && eval == i) {
|
if (stringEvalIndex != null && stringEvalIndex == i) {
|
||||||
stringLength--;
|
stringLength--;
|
||||||
console.log("Decreasing stringLength variable to", stringLength);
|
console.log("Decreasing stringLength variable to", stringLength);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user