Lines Matching defs:size
25 static Encode IsUtf8Data(const uint8_t* data, size_t size)
31 for (auto i = 0; i < size; i++) {
70 static Encode DetectEncode(const uint8_t* data, size_t size)
74 // Detect the size and the first and second bytes
75 if (size > utf16HeadLen && data[0] == 0xFF && data[1] == 0xFE) {
77 // Detect the size and the first and second bytes
78 } else if (size > utf16HeadLen && data[0] == 0xFE && data[1] == 0xFF) {
80 // Detect the size and the first, second, and third bytes
81 } else if (size > utf8HeadLen && data[0] == 0xEF && data[1] == 0xBB&& data[2] == 0xBF) { // NOLINT
84 return IsUtf8Data(data, size);