[ion] Namespace Ion::UTF8Helper and Ion::UTF8Decoder

This commit is contained in:
Émilie Feral
2019-04-26 17:47:40 +02:00
parent a499aa9b2c
commit 23da0d3f2c
39 changed files with 145 additions and 129 deletions

View File

@@ -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;
}
}