mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-20 09:17:23 +01:00
[ion] Namespace Ion::UTF8Helper and Ion::UTF8Decoder
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#include <ion/unicode/utf8_decoder.h>
|
||||
#include <assert.h>
|
||||
|
||||
namespace Ion {
|
||||
|
||||
static inline int leading_ones(uint8_t value) {
|
||||
for (int i=0; i<8; i++) {
|
||||
if (!(value & 0x80)) {
|
||||
@@ -107,3 +109,5 @@ size_t UTF8Decoder::CodePointToChars(CodePoint c, char * buffer, size_t bufferSi
|
||||
assert(i == charCount);
|
||||
return charCount;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user