Let's try mozilla's fixedCharAt function
This commit is contained in:
parent
48f0fb02ee
commit
c49babb9a1
@ -214,13 +214,14 @@ const surrogatePairs = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
||||
var charIterateState;
|
||||
function charIterate(input) {
|
||||
let stringLength = (input.length - 1);
|
||||
console.log(surrogatePairs.exec(input));
|
||||
console.log(surrogatePairs.lastIndex);
|
||||
let temp = input.toCharArray();
|
||||
for (let i = 0; i < stringLength; ++i) {
|
||||
if (false) {
|
||||
let compareString = temp.join("");
|
||||
if (surrogatePairs.exec(input).index == i) {
|
||||
stringLength--;
|
||||
console.log("Decreasing stringLength variable to", stringLength);
|
||||
}
|
||||
temp.shift();
|
||||
}
|
||||
if (charIterateState == undefined) {
|
||||
console.log("undefined! setting to zero");
|
||||
|
Loading…
x
Reference in New Issue
Block a user