Lines Matching refs:StringPiece

35 using ::android::StringPiece;
42 const StringPiece& str, char sep, const std::function<char(char)>& f) { in SplitAndTransform()
44 const StringPiece::const_iterator end = std::end(str); in SplitAndTransform()
45 StringPiece::const_iterator start = std::begin(str); in SplitAndTransform()
46 StringPiece::const_iterator current; in SplitAndTransform()
59 std::vector<std::string> Split(const StringPiece& str, char sep) { in Split()
63 std::vector<std::string> SplitAndLowercase(const StringPiece& str, char sep) { in SplitAndLowercase()
67 bool StartsWith(const StringPiece& str, const StringPiece& prefix) { in StartsWith()
74 bool EndsWith(const StringPiece& str, const StringPiece& suffix) { in EndsWith()
81 StringPiece TrimLeadingWhitespace(const StringPiece& str) { in TrimLeadingWhitespace()
92 return StringPiece(start, end - start); in TrimLeadingWhitespace()
95 StringPiece TrimTrailingWhitespace(const StringPiece& str) { in TrimTrailingWhitespace()
106 return StringPiece(start, end - start); in TrimTrailingWhitespace()
109 StringPiece TrimWhitespace(const StringPiece& str) { in TrimWhitespace()
125 return StringPiece(start, end - start); in TrimWhitespace()
128 static int IsJavaNameImpl(const StringPiece& str) { in IsJavaNameImpl()
130 for (const StringPiece& piece : Tokenize(str, '.')) { in IsJavaNameImpl()
139 bool IsJavaClassName(const StringPiece& str) { in IsJavaClassName()
143 bool IsJavaPackageName(const StringPiece& str) { in IsJavaPackageName()
147 static int IsAndroidNameImpl(const StringPiece& str) { in IsAndroidNameImpl()
149 for (const StringPiece& piece : Tokenize(str, '.')) { in IsAndroidNameImpl()
171 bool IsAndroidPackageName(const StringPiece& str) { in IsAndroidPackageName()
175 bool IsAndroidSplitName(const StringPiece& str) { in IsAndroidSplitName()
179 Maybe<std::string> GetFullyQualifiedClassName(const StringPiece& package, in GetFullyQualifiedClassName()
180 const StringPiece& classname) { in GetFullyQualifiedClassName()
230 bool VerifyJavaStringFormat(const StringPiece& str) { in VerifyJavaStringFormat()
421 std::u16string Utf8ToUtf16(const StringPiece& utf8) { in Utf8ToUtf16()
500 Tokenizer::iterator::iterator(const StringPiece& s, char sep, const StringPiece& tok, bool end) in iterator()
503 Tokenizer::Tokenizer(const StringPiece& str, char sep) in Tokenizer()
504 : begin_(++iterator(str, sep, StringPiece(str.begin() - 1, 0), false)), in Tokenizer()
505 end_(str, sep, StringPiece(str.end(), 0), true) {} in Tokenizer()
507 bool ExtractResFilePathParts(const StringPiece& path, StringPiece* out_prefix, in ExtractResFilePathParts()
508 StringPiece* out_entry, StringPiece* out_suffix) { in ExtractResFilePathParts()
509 const StringPiece res_prefix("res/"); in ExtractResFilePathParts()
514 StringPiece::const_iterator last_occurence = path.end(); in ExtractResFilePathParts()
527 *out_suffix = StringPiece(iter, path.end() - iter); in ExtractResFilePathParts()
528 *out_entry = StringPiece(last_occurence + 1, iter - last_occurence - 1); in ExtractResFilePathParts()
529 *out_prefix = StringPiece(path.begin(), last_occurence - path.begin() + 1); in ExtractResFilePathParts()