diff options
author | Neil <nyamatongwe@gmail.com> | 2025-02-04 09:49:10 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2025-02-04 09:49:10 +1100 |
commit | ef961772c3ced424f034c2055263d7231eccee01 (patch) | |
tree | dd6d87ad09d3c474ccc93c57598e20e302ed1599 /src/UniConversion.h | |
parent | f54fd2019dd648b29a80ec7429833ab546d3a428 (diff) | |
download | scintilla-mirror-ef961772c3ced424f034c2055263d7231eccee01.tar.gz |
Add overload of UnicodeFromUTF8 that takes a string_view.
Diffstat (limited to 'src/UniConversion.h')
-rw-r--r-- | src/UniConversion.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/UniConversion.h b/src/UniConversion.h index 657e3eca7..7a51b2d08 100644 --- a/src/UniConversion.h +++ b/src/UniConversion.h @@ -43,6 +43,7 @@ inline int UnicodeFromUTF8(const unsigned char *us) noexcept { return ((us[0] & 0x7) << 18) + ((us[1] & 0x3F) << 12) + ((us[2] & 0x3F) << 6) + (us[3] & 0x3F); } } +int UnicodeFromUTF8(std::string_view sv) noexcept; constexpr bool UTF8IsTrailByte(unsigned char ch) noexcept { return (ch >= 0x80) && (ch < 0xc0); |