HomeSort by relevance Sort by last modified time
    Searched refs:ValidUTF8CharLength (Results 1 - 4 of 4) sorted by null

  /external/libtextclassifier/utils/strings/
utf8_test.cc 45 TEST(Utf8Test, ValidUTF8CharLength) {
46 EXPECT_EQ(ValidUTF8CharLength("1234?hello", 13), 1);
47 EXPECT_EQ(ValidUTF8CharLength("\u304A\u00B0\u106B", 8), 3);
48 EXPECT_EQ(ValidUTF8CharLength("this is a test???", 26), 1);
49 EXPECT_EQ(ValidUTF8CharLength("\xf0\x9f\x98\x8b", 4), 4);
51 EXPECT_EQ(ValidUTF8CharLength("\xf0\x9f", 2), -1);
53 EXPECT_EQ(ValidUTF8CharLength("\xf0\x9f\x98\x8b\x8b", 5), 4);
55 EXPECT_EQ(ValidUTF8CharLength("\xf0\x9f\x98\x61\x61", 5), -1);
utf8.cc 22 const int char_length = ValidUTF8CharLength(src + i, size - i);
31 int ValidUTF8CharLength(const char *src, int size) {
utf8.h 52 int ValidUTF8CharLength(const char *src, int size);
  /external/libtextclassifier/utils/sentencepiece/
normalizer.cc 127 const int char_length = ValidUTF8CharLength(input.data(), input.size());

Completed in 104 milliseconds