From 229f04ba358b3485fa7952088e03dad9e651bb23 Mon Sep 17 00:00:00 2001 From: Cashew <52880648+Scrub1492@users.noreply.github.com> Date: Wed, 20 Dec 2023 21:36:27 +0900 Subject: rename variables (#409) * rename variables * add comment to ambiguous variable * rename variables * add comments * rename functions --- ext/js/data/sandbox/string-util.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/js/data/sandbox/string-util.js') diff --git a/ext/js/data/sandbox/string-util.js b/ext/js/data/sandbox/string-util.js index 096ecffe..3d810ffb 100644 --- a/ext/js/data/sandbox/string-util.js +++ b/ext/js/data/sandbox/string-util.js @@ -35,10 +35,10 @@ export class StringUtil { result += char; if (++position >= textLength) { break; } const charCode = char.charCodeAt(0); - if (charCode >= 0xd800 && charCode < 0xdc00) { + if (charCode >= 0xd800 && charCode < 0xdc00) { // charCode is a high surrogate code const char2 = text[position]; const charCode2 = char2.charCodeAt(0); - if (charCode2 >= 0xdc00 && charCode2 < 0xe000) { + if (charCode2 >= 0xdc00 && charCode2 < 0xe000) { // charCode2 is a low surrogate code result += char2; if (++position >= textLength) { break; } } @@ -61,10 +61,10 @@ export class StringUtil { result = char + result; if (--position < 0) { break; } const charCode = char.charCodeAt(0); - if (charCode >= 0xdc00 && charCode < 0xe000) { + if (charCode >= 0xdc00 && charCode < 0xe000) { // charCode is a low surrogate code const char2 = text[position]; const charCode2 = char2.charCodeAt(0); - if (charCode2 >= 0xd800 && charCode2 < 0xdc00) { + if (charCode2 >= 0xd800 && charCode2 < 0xdc00) { // charCode2 is a high surrogate code result = char2 + result; if (--position < 0) { break; } } -- cgit v1.2.3