Lines Matching refs:s

597 std::string MangleForJni(const std::string& s) {  in MangleForJni()  argument
599 size_t char_count = CountModifiedUtf8Chars(s.c_str()); in MangleForJni()
600 const char* cp = &s[0]; in MangleForJni()
768 bool IsValidMemberName(const char* s) { in IsValidMemberName() argument
771 switch (*s) { in IsValidMemberName()
777 s++; in IsValidMemberName()
782 switch (*s) { in IsValidMemberName()
786 return angle_name && s[1] == '\0'; in IsValidMemberName()
789 if (!IsValidPartOfMemberNameUtf8(&s)) { in IsValidMemberName()
796 static bool IsValidClassName(const char* s, ClassNameType type, char separator) { in IsValidClassName() argument
798 while (*s == '[') { in IsValidClassName()
800 s++; in IsValidClassName()
824 switch (*(s++)) { in IsValidClassName()
834 return (*s == '\0'); in IsValidClassName()
837 return (arrayCount == 0) && (*s == '\0'); in IsValidClassName()
855 uint8_t c = (uint8_t) *s; in IsValidClassName()
873 return (type == kDescriptor) && !sepOrFirst && (s[1] == '\0'); in IsValidClassName()
885 s++; in IsValidClassName()
888 if (!IsValidPartOfMemberNameUtf8(&s)) { in IsValidClassName()
897 bool IsValidBinaryClassName(const char* s) { in IsValidBinaryClassName() argument
898 return IsValidClassName(s, kName, '.'); in IsValidBinaryClassName()
901 bool IsValidJniClassName(const char* s) { in IsValidJniClassName() argument
902 return IsValidClassName(s, kName, '/'); in IsValidJniClassName()
905 bool IsValidDescriptor(const char* s) { in IsValidDescriptor() argument
906 return IsValidClassName(s, kDescriptor, '/'); in IsValidDescriptor()
909 void Split(const std::string& s, char separator, std::vector<std::string>& result) { in Split() argument
910 const char* p = s.data(); in Split()
911 const char* end = p + s.size(); in Split()
925 std::string Trim(std::string s) { in Trim() argument
928 unsigned int end_index = s.size() - 1; in Trim()
931 while (start_index < s.size()) { in Trim()
932 if (!isspace(s[start_index])) { in Trim()
940 if (!isspace(s[end_index])) { in Trim()
951 return s.substr(start_index, end_index - start_index + 1); in Trim()
973 bool StartsWith(const std::string& s, const char* prefix) { in StartsWith() argument
974 return s.compare(0, strlen(prefix), prefix) == 0; in StartsWith()
977 bool EndsWith(const std::string& s, const char* suffix) { in EndsWith() argument
979 size_t string_length = s.size(); in EndsWith()
984 return s.compare(offset, suffix_length, suffix) == 0; in EndsWith()
990 const char* s = thread_name; in SetThreadName() local
991 while (*s) { in SetThreadName()
992 if (*s == '.') { in SetThreadName()
994 } else if (*s == '@') { in SetThreadName()
997 s++; in SetThreadName()
999 int len = s - thread_name; in SetThreadName()
1001 s = thread_name; in SetThreadName()
1003 s = thread_name + len - 15; in SetThreadName()
1008 strncpy(buf, s, sizeof(buf)-1); in SetThreadName()
1017 prctl(PR_SET_NAME, (unsigned long) s, 0, 0, 0); // NOLINT (unsigned long) in SetThreadName()