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