Rename some unicode functions and document better
This commit is contained in:
@@ -163,7 +163,7 @@ static int32_t read_codepoint_utf8(std::string_view &source) {
|
||||
return codepoint;
|
||||
}
|
||||
|
||||
std::string to_utf8(const std::u32string &s) {
|
||||
std::string utf32_to_utf8(const std::u32string &s) {
|
||||
std::string result(s.size() * 4, 0);
|
||||
char *buffer = &result[0];
|
||||
int len = 0;
|
||||
@@ -174,7 +174,7 @@ std::string to_utf8(const std::u32string &s) {
|
||||
return result.substr(0, len);
|
||||
}
|
||||
|
||||
std::u32string from_utf8(std::string_view s, int *consumed) {
|
||||
std::u32string utf8_to_utf32(std::string_view s, int *consumed) {
|
||||
std::string_view rest = s;
|
||||
std::u32string result(s.size(), 0);
|
||||
int len = 0;
|
||||
|
||||
Reference in New Issue
Block a user