diff options
author | mihaild <mihaild@yandex-team.ru> | 2022-02-10 16:46:59 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:59 +0300 |
commit | 246417ad6168d3f7ab4a0cf1c79ba4259f7c45ae (patch) | |
tree | 2a65611ade91c8ae2f55647107c1a11ea743abd5 /util/charset/utf8.h | |
parent | 5598c5e7bc7619bd51d87fea7b880b7788ad0b47 (diff) | |
download | ydb-246417ad6168d3f7ab4a0cf1c79ba4259f7c45ae.tar.gz |
Restoring authorship annotation for <mihaild@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/charset/utf8.h')
-rw-r--r-- | util/charset/utf8.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/util/charset/utf8.h b/util/charset/utf8.h index 5039b46ae9..9b4c9a05b0 100644 --- a/util/charset/utf8.h +++ b/util/charset/utf8.h @@ -16,24 +16,24 @@ inline unsigned char UTF8LeadByteMask(size_t utf8_rune_len) { } inline size_t UTF8RuneLen(const unsigned char lead_byte) { - //b0XXXXXXX - if ((lead_byte & 0x80) == 0x00) { - return 1; - } - //b110XXXXX - if ((lead_byte & 0xe0) == 0xc0) { - return 2; - } - //b1110XXXX - if ((lead_byte & 0xf0) == 0xe0) { - return 3; - } - //b11110XXX - if ((lead_byte & 0xf8) == 0xf0) { - return 4; - } - //b10XXXXXX - return 0; + //b0XXXXXXX + if ((lead_byte & 0x80) == 0x00) { + return 1; + } + //b110XXXXX + if ((lead_byte & 0xe0) == 0xc0) { + return 2; + } + //b1110XXXX + if ((lead_byte & 0xf0) == 0xe0) { + return 3; + } + //b11110XXX + if ((lead_byte & 0xf8) == 0xf0) { + return 4; + } + //b10XXXXXX + return 0; } inline size_t UTF8RuneLenByUCS(wchar32 rune) { |