MCPcopy Create free account
hub / github.com/catboost/catboost / ValidateUTF8

Function ValidateUTF8

contrib/libs/flatbuffers/src/idl_parser.cpp:66–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64#define EXPECT(tok) ECHECK(Expect(tok))
65
66static bool ValidateUTF8(const std::string &str) {
67 const char *s = &str[0];
68 const char *const sEnd = s + str.length();
69 while (s < sEnd) {
70 if (FromUTF8(&s) < 0) { return false; }
71 }
72 return true;
73}
74
75static bool IsLowerSnakeCase(const std::string &str) {
76 for (size_t i = 0; i < str.length(); i++) {

Callers 1

NextMethod · 0.85

Calls 2

FromUTF8Function · 0.85
lengthMethod · 0.45

Tested by

no test coverage detected