Home | History | Annotate | Download | only in strings

Lines Matching refs:src

23 // src, based on inspecting just that one byte.  Preconditions: src != NULL,
24 // *src can be read, and *src is not '\0', and src points to a well-formed UTF-8
26 static inline int GetNumBytesForNonZeroUTF8Char(const char *src) {
28 // The cast below makes sure we always interpret *src as an unsigned char.
30 [(*(reinterpret_cast<const unsigned char *>(src)) & 0xFF) >> 4];
33 // Like GetNumBytesForNonZeroUTF8Char, but *src may be '\0'; returns 0 in that
35 static inline int GetNumBytesForUTF8Char(const char *src) {
36 if (*src == '\0') return 0;
37 return GetNumBytesForNonZeroUTF8Char(src);
47 // Returns true iff src points to a well-formed UTF-8 string.
48 bool IsValidUTF8(const char *src, int size);