summaryrefslogtreecommitdiff
path: root/source/core/slang-char-encode.h
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-08-12 20:53:03 -0700
committerGitHub <noreply@github.com>2024-08-12 20:53:03 -0700
commitb390566b55700582321b09b72c726b8dff9bd819 (patch)
treea2fd8e50fcbde29dd2651e08a78021f2ae9d72de /source/core/slang-char-encode.h
parent20bd48659d0009de5477380c335e2419f4c66f8b (diff)
Support unicode identifier names. (#4772)
* Support unicode identifier names. * Fix. * Fix language server. * Fix build errors. * Fix. * Fix offset translation in language server.
Diffstat (limited to 'source/core/slang-char-encode.h')
-rw-r--r--source/core/slang-char-encode.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/core/slang-char-encode.h b/source/core/slang-char-encode.h
index 2bb4cba29..a7cd501ab 100644
--- a/source/core/slang-char-encode.h
+++ b/source/core/slang-char-encode.h
@@ -203,6 +203,10 @@ struct UTF8Util
/// Non valid utf8 input or ending starting in partial characters, will produce
/// undefined results without error.
static Index calcCodePointCount(const UnownedStringSlice& in);
+
+
+ /// Given a slice in UTF8, calculate the number of UTF16 characters needed to represent the string.
+ static Index calcUTF16CharCount(const UnownedStringSlice& in);
};
}