Lines Matching refs:StringPiece

36 using ::android::StringPiece;
47 static std::vector<std::string> SplitAndTransform(StringPiece str, char sep, char (*f)(char)) { in SplitAndTransform()
49 const StringPiece::const_iterator end = std::end(str); in SplitAndTransform()
50 StringPiece::const_iterator start = std::begin(str); in SplitAndTransform()
51 StringPiece::const_iterator current; in SplitAndTransform()
64 std::vector<std::string> Split(StringPiece str, char sep) { in Split()
68 std::vector<std::string> SplitAndLowercase(StringPiece str, char sep) { in SplitAndLowercase()
72 bool StartsWith(StringPiece str, StringPiece prefix) { in StartsWith()
79 bool EndsWith(StringPiece str, StringPiece suffix) { in EndsWith()
86 StringPiece TrimLeadingWhitespace(StringPiece str) { in TrimLeadingWhitespace()
97 return StringPiece(start, end - start); in TrimLeadingWhitespace()
100 StringPiece TrimTrailingWhitespace(StringPiece str) { in TrimTrailingWhitespace()
111 return StringPiece(start, end - start); in TrimTrailingWhitespace()
114 StringPiece TrimWhitespace(StringPiece str) { in TrimWhitespace()
130 return StringPiece(start, end - start); in TrimWhitespace()
133 static int IsJavaNameImpl(StringPiece str) { in IsJavaNameImpl()
135 for (StringPiece piece : Tokenize(str, '.')) { in IsJavaNameImpl()
144 bool IsJavaClassName(StringPiece str) { in IsJavaClassName()
148 bool IsJavaPackageName(StringPiece str) { in IsJavaPackageName()
152 static int IsAndroidNameImpl(StringPiece str) { in IsAndroidNameImpl()
154 for (StringPiece piece : Tokenize(str, '.')) { in IsAndroidNameImpl()
176 bool IsAndroidPackageName(StringPiece str) { in IsAndroidPackageName()
183 bool IsAndroidSharedUserId(android::StringPiece package_name, android::StringPiece shared_user_id) { in IsAndroidSharedUserId()
191 bool IsAndroidSplitName(StringPiece str) { in IsAndroidSplitName()
195 std::optional<std::string> GetFullyQualifiedClassName(StringPiece package, StringPiece classname) { in GetFullyQualifiedClassName()
267 bool VerifyJavaStringFormat(StringPiece str) { in VerifyJavaStringFormat()
357 std::u16string Utf8ToUtf16(StringPiece utf8) { in Utf8ToUtf16()
397 token_ = StringPiece(token_.end(), 0); in operator ++()
405 token_ = StringPiece(start, current - start); in operator ++()
410 token_ = StringPiece(start, end - start); in operator ++()
425 Tokenizer::iterator::iterator(StringPiece s, char sep, StringPiece tok, bool end) in iterator()
429 Tokenizer::Tokenizer(StringPiece str, char sep) in Tokenizer()
430 : begin_(++iterator(str, sep, StringPiece(str.begin() - 1, 0), false)), in Tokenizer()
431 end_(str, sep, StringPiece(str.end(), 0), true) { in Tokenizer()
434 bool ExtractResFilePathParts(StringPiece path, StringPiece* out_prefix, StringPiece* out_entry, in ExtractResFilePathParts()
435 StringPiece* out_suffix) { in ExtractResFilePathParts()
436 const StringPiece res_prefix("res/"); in ExtractResFilePathParts()
441 StringPiece::const_iterator last_occurence = path.end(); in ExtractResFilePathParts()
454 *out_suffix = StringPiece(iter, path.end() - iter); in ExtractResFilePathParts()
455 *out_entry = StringPiece(last_occurence + 1, iter - last_occurence - 1); in ExtractResFilePathParts()
456 *out_prefix = StringPiece(path.begin(), last_occurence - path.begin() + 1); in ExtractResFilePathParts()