MCPcopy Create free account
hub / github.com/bytedance/Fastbot_Android / ValidateUTF8

Function ValidateUTF8

native/thirdpart/flatbuffers/idl_parser.cpp:76–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74#define EXPECT(tok) ECHECK(Expect(tok))
75
76static bool ValidateUTF8(const std::string &str) {
77 const char *s = &str[0];
78 const char *const sEnd = s + str.length();
79 while (s < sEnd) {
80 if (FromUTF8(&s) < 0) { return false; }
81 }
82 return true;
83}
84
85static bool IsLowerSnakeCase(const std::string &str) {
86 for (size_t i = 0; i < str.length(); i++) {

Callers 1

NextMethod · 0.85

Calls 2

FromUTF8Function · 0.85
lengthMethod · 0.80

Tested by

no test coverage detected