From 588286b3f198ce06a056efa7718309ad18db2d58 Mon Sep 17 00:00:00 2001 From: Caleb Fontenot Date: Sun, 30 Apr 2023 19:45:26 -0500 Subject: [PATCH] Let's try mozilla's fixedCharAt function --- commands/drawDesign.cjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/drawDesign.cjs b/commands/drawDesign.cjs index 690d8ac..5ac28fc 100644 --- a/commands/drawDesign.cjs +++ b/commands/drawDesign.cjs @@ -214,8 +214,9 @@ const surrogatePairs = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; var charIterateState; function charIterate(input) { let stringLength = (input.length - 1); + console.log(surrogatePairs.exec(input.charCodeAt(charIterateState))); for (let i = 0; i < stringLength; ++i) { - if (surrogatePairs.exec(input.charCodeAt(charIterateState)) !== null) { + if (false) { stringLength--; console.log("Decreasing stringLength variable to", stringLength); }