aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/UniConversion.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-05-14 15:24:16 +1000
committerNeil <nyamatongwe@gmail.com>2018-05-14 15:24:16 +1000
commit5b869b233d5f927f03dc9a70a7006c7dcbf5c88e (patch)
treecbdab8a8f954763c72b6710be80fa6bd985ed5d4 /src/UniConversion.h
parentcebd3113ce6b1e4dbc98f458c6033fd41e29d69d (diff)
downloadscintilla-mirror-5b869b233d5f927f03dc9a70a7006c7dcbf5c88e.tar.gz
Use string_view for UniConversion functions.
Diffstat (limited to 'src/UniConversion.h')
-rw-r--r--src/UniConversion.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/UniConversion.h b/src/UniConversion.h
index 4cdfe1fac..1b84b8f81 100644
--- a/src/UniConversion.h
+++ b/src/UniConversion.h
@@ -14,12 +14,12 @@ const int UTF8MaxBytes = 4;
const int unicodeReplacementChar = 0xFFFD;
-size_t UTF8Length(const wchar_t *uptr, size_t tlen);
-void UTF8FromUTF16(const wchar_t *uptr, size_t tlen, char *putf, size_t len);
+size_t UTF8Length(std::wstring_view wsv);
+void UTF8FromUTF16(std::wstring_view wsv, char *putf, size_t len);
void UTF8FromUTF32Character(int uch, char *putf);
-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);
+size_t UTF16Length(std::string_view sv);
+size_t UTF16FromUTF8(std::string_view sv, wchar_t *tbuf, size_t tlen);
+size_t UTF32FromUTF8(std::string_view sv, unsigned int *tbuf, size_t tlen);
unsigned int UTF16FromUTF32Character(unsigned int val, wchar_t *tbuf) noexcept;
std::string FixInvalidUTF8(const std::string &text);