diff options
author | Neil <nyamatongwe@gmail.com> | 2018-07-10 15:06:50 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-07-10 15:06:50 +1000 |
commit | 72b5df15f33da27c59efd54eb0c84e173ca8c692 (patch) | |
tree | a65cbcf60c89542255a27672302e5de5e715624e /src/UniConversion.h | |
parent | 34540c84e31840787054652b72be7709d79eb1a2 (diff) | |
download | scintilla-mirror-72b5df15f33da27c59efd54eb0c84e173ca8c692.tar.gz |
Backport: Optional indexing of line starts in UTF-8 documents by UTF-32 code points and
UTF-16 code units added.
Converted instances of C++17 std::string_view to C++11.
Also used const_casts where appropriate to fix compile errors.
Backport of changeset 7063:0d5edc93e280.
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 0eb9f5378..4bb8875d0 100644 --- a/src/UniConversion.h +++ b/src/UniConversion.h @@ -21,6 +21,7 @@ size_t UTF16Length(const char *s, size_t len); size_t UTF16FromUTF8(const char *s, size_t len, wchar_t *tbuf, size_t tlen); size_t UTF32FromUTF8(const char *s, size_t len, unsigned int *tbuf, size_t tlen); unsigned int UTF16FromUTF32Character(unsigned int val, wchar_t *tbuf) noexcept; +bool UTF8IsValid(const char *s, size_t len) noexcept; std::string FixInvalidUTF8(const std::string &text); extern const unsigned char UTF8BytesOfLead[256]; |