diff options
author | nyamatongwe <unknown> | 2012-05-26 12:17:54 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2012-05-26 12:17:54 +1000 |
commit | 477a06c700990e4b646472ce1682a8e68a93383d (patch) | |
tree | 53c15b811862eb874a98d071ac854724da52ba1b /src/UniConversion.h | |
parent | c725c015867e59efd1ebe66e0247b62e38e04ac9 (diff) | |
download | scintilla-mirror-477a06c700990e4b646472ce1682a8e68a93383d.tar.gz |
Optimize UTF-8 character length calculations by using an array.
Diffstat (limited to 'src/UniConversion.h')
-rw-r--r-- | src/UniConversion.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/UniConversion.h b/src/UniConversion.h index 6793221cf..87cc43f77 100644 --- a/src/UniConversion.h +++ b/src/UniConversion.h @@ -11,6 +11,9 @@ unsigned int UTF8CharLength(unsigned char ch); unsigned int UTF16Length(const char *s, unsigned int len); unsigned int UTF16FromUTF8(const char *s, unsigned int len, wchar_t *tbuf, unsigned int tlen); +extern int UTF8BytesOfLead[256]; +void UTF8BytesOfLeadInitialise(); + inline bool UTF8IsTrailByte(int ch) { return (ch >= 0x80) && (ch < 0xc0); } |