Home
last modified time | relevance | path

Searched refs:StringPiece (Results 1 – 25 of 211) sorted by relevance

123456789

/external/regex-re2/re2/
Dstringpiece.h29 class StringPiece {
38 StringPiece() : ptr_(NULL), length_(0) { } in StringPiece() function
39 StringPiece(const char* str) in StringPiece() function
41 StringPiece(const std::string& str) in StringPiece() function
43 StringPiece(const char* offset, int len) : ptr_(offset), length_(len) { } in StringPiece() function
79 int compare(const StringPiece& x) const { in compare()
104 bool starts_with(const StringPiece& x) const { in starts_with()
110 bool ends_with(const StringPiece& x) const { in ends_with()
141 int find(const StringPiece& s, size_type pos = 0) const;
143 int rfind(const StringPiece& s, size_type pos = npos) const;
[all …]
Dprog.h231 static uint32 EmptyFlags(const StringPiece& context, const char* p);
262 bool SearchNFA(const StringPiece& text, const StringPiece& context,
264 StringPiece* match, int nmatch);
272 bool SearchDFA(const StringPiece& text, const StringPiece& context,
274 StringPiece* match0, bool* failed,
293 bool SearchOnePass(const StringPiece& text, const StringPiece& context,
295 StringPiece* match, int nmatch);
299 bool SearchBitState(const StringPiece& text, const StringPiece& context,
301 StringPiece* match, int nmatch);
311 bool UnsafeSearchBacktrack(const StringPiece& text,
[all …]
Dre2.h265 RE2(const StringPiece& pattern);
266 RE2(const StringPiece& pattern, const Options& option);
328 static bool FullMatchN(const StringPiece& text, const RE2& re,
331 bool, const StringPiece&, const RE2&, Arg, RE2::FullMatchN> FullMatch;
335 static bool PartialMatchN(const StringPiece& text, const RE2& re, // 3..16 args
338 bool, const StringPiece&, const RE2&, Arg, RE2::PartialMatchN> PartialMatch;
343 static bool ConsumeN(StringPiece* input, const RE2& pattern, // 3..16 args
346 bool, StringPiece*, const RE2&, Arg, RE2::ConsumeN> Consume;
352 static bool FindAndConsumeN(StringPiece* input, const RE2& pattern,
355 bool, StringPiece*, const RE2&, Arg, RE2::FindAndConsumeN> FindAndConsume;
[all …]
/external/libweave/third_party/chromium/base/strings/
Dstring_piece.h36 typedef BasicStringPiece<std::string> StringPiece; typedef
49 void CopyToString(const StringPiece& self, std::string* target);
51 void AppendToString(const StringPiece& self, std::string* target);
53 size_t copy(const StringPiece& self, char* buf, size_t n, size_t pos);
55 size_t find(const StringPiece& self, const StringPiece& s, size_t pos);
56 size_t find(const StringPiece& self, char c, size_t pos);
58 size_t rfind(const StringPiece& self, const StringPiece& s, size_t pos);
59 size_t rfind(const StringPiece& self, char c, size_t pos);
61 size_t find_first_of(const StringPiece& self, const StringPiece& s, size_t pos);
63 size_t find_first_not_of(const StringPiece& self,
[all …]
Dstring_piece.cc26 inline void BuildLookupTable(const StringPiece& characters_wanted, in BuildLookupTable()
42 bool operator==(const StringPiece& x, const StringPiece& y) { in operator ==()
46 return StringPiece::wordmemcmp(x.data(), y.data(), x.size()) == 0; in operator ==()
49 std::ostream& operator<<(std::ostream& o, const StringPiece& piece) { in operator <<()
64 void CopyToString(const StringPiece& self, std::string* target) { in CopyToString()
74 void AppendToString(const StringPiece& self, std::string* target) { in AppendToString()
88 size_t copy(const StringPiece& self, char* buf, size_t n, size_t pos) { in copy()
106 size_t find(const StringPiece& self, const StringPiece& s, size_t pos) { in find()
123 size_t find(const StringPiece& self, char c, size_t pos) { in find()
145 size_t rfind(const StringPiece& self, const StringPiece& s, size_t pos) { in rfind()
[all …]
Dstring_util.h78 std::string ToLowerASCII(StringPiece str);
80 std::string ToUpperASCII(StringPiece str);
104 int CompareCaseInsensitiveASCII(StringPiece a, StringPiece b);
109 bool EqualsCaseInsensitiveASCII(StringPiece a, StringPiece b);
122 const StringPiece& replace_chars,
139 StringPiece trim_chars,
144 StringPiece TrimString(StringPiece input,
145 const StringPiece& trim_chars,
173 bool IsStringUTF8(const StringPiece& str);
174 bool IsStringASCII(const StringPiece& str);
Dstring_number_conversions.h66 bool StringToInt(const StringPiece& input, int* output);
68 bool StringToUint(const StringPiece& input, unsigned* output);
70 bool StringToInt64(const StringPiece& input, int64_t* output);
72 bool StringToUint64(const StringPiece& input, uint64_t* output);
74 bool StringToSizeT(const StringPiece& input, size_t* output);
100 bool HexStringToInt(const StringPiece& input, int* output);
106 bool HexStringToUInt(const StringPiece& input, uint32_t* output);
111 bool HexStringToInt64(const StringPiece& input, int64_t* output);
117 bool HexStringToUInt64(const StringPiece& input, uint64_t* output);
Dstring_util.cc60 std::string ToLowerASCII(StringPiece str) { in ToLowerASCII()
64 std::string ToUpperASCII(StringPiece str) { in ToUpperASCII()
95 int CompareCaseInsensitiveASCII(StringPiece a, StringPiece b) { in CompareCaseInsensitiveASCII()
99 bool EqualsCaseInsensitiveASCII(StringPiece a, StringPiece b) { in EqualsCaseInsensitiveASCII()
126 const StringPiece& replace_chars, in ReplaceChars()
169 StringPiece trim_chars, in TrimString()
185 StringPiece TrimString(StringPiece input, in TrimString()
186 const StringPiece& trim_chars, in TrimString()
194 return TrimStringT(input, StringPiece(kWhitespaceASCII), positions, output); in TrimWhitespaceASCII()
227 bool IsStringASCII(const StringPiece& str) { in IsStringASCII()
[all …]
/external/regex-re2/re2/testing/
Dtester.h54 TestInstance(const StringPiece& regexp, Prog::MatchKind kind,
62 bool RunCase(const StringPiece& text, const StringPiece& context,
68 const StringPiece& text, const StringPiece& context,
72 void LogMatch(const char* prefix, Engine e, const StringPiece& text,
73 const StringPiece& context, Prog::Anchor anchor);
75 const StringPiece& regexp_str_; // regexp being tested
93 explicit Tester(const StringPiece& regexp);
100 bool TestCase(const StringPiece& text, const StringPiece& context,
104 bool TestInput(const StringPiece& text);
107 bool TestInputInContext(const StringPiece& text, const StringPiece& context);
[all …]
Dbacktrack.cc53 bool Search(const StringPiece& text, const StringPiece& context,
55 StringPiece* submatch, int nsubmatch);
64 StringPiece text_; // text being searched
65 StringPiece context_; // greater context of text being searched
69 StringPiece *submatch_; // submatches to fill in
94 bool Backtracker::Search(const StringPiece& text, const StringPiece& context, in Search()
96 StringPiece* submatch, int nsubmatch) { in Search()
115 StringPiece sp0; in Search()
215 submatch_[i] = StringPiece(cap_[2*i], cap_[2*i+1] - cap_[2*i]); in Visit()
225 bool Prog::UnsafeSearchBacktrack(const StringPiece& text, in UnsafeSearchBacktrack()
[all …]
Dregexp_benchmark.cc30 StringPiece sp[4]; in Test()
59 StringPiece sp[4]; in MemoryUsage()
105 typedef void SearchImpl(int iters, const char* regexp, const StringPiece& text,
113 typedef void ParseImpl(int iters, const char* regexp, const StringPiece& text);
274 StringPiece t = s; in FindAndConsume()
275 StringPiece u; in FindAndConsume()
351 StringPiece(text, len), Prog::kAnchored, true); in SearchDigits()
374 void (*parse3)(int, const char*, const StringPiece&)) { in Parse3Digits() argument
413 void (*parse3)(int, const char*, const StringPiece&)) { in Parse3DigitDs() argument
454 void (*parse1)(int, const char*, const StringPiece&)) { in Parse1Split() argument
[all …]
/external/libchrome/base/strings/
Dstring_util.h111 BASE_EXPORT std::string ToLowerASCII(StringPiece str);
115 BASE_EXPORT std::string ToUpperASCII(StringPiece str);
140 BASE_EXPORT int CompareCaseInsensitiveASCII(StringPiece a, StringPiece b);
146 BASE_EXPORT bool EqualsCaseInsensitiveASCII(StringPiece a, StringPiece b);
183 const StringPiece& remove_chars,
196 const StringPiece& replace_chars,
216 StringPiece trim_chars,
224 BASE_EXPORT StringPiece TrimString(StringPiece input,
225 const StringPiece& trim_chars,
249 BASE_EXPORT StringPiece TrimWhitespaceASCII(StringPiece input,
[all …]
Dstring_split.cc28 std::string PieceToOutputType<std::string, std::string>(StringPiece piece) { in PieceToOutputType()
41 template<> StringPiece WhitespaceForType<std::string>() { in WhitespaceForType()
51 size_t FindFirstOf(StringPiece piece, char c, size_t pos) { in FindFirstOf()
57 size_t FindFirstOf(StringPiece piece, StringPiece one_of, size_t pos) { in FindFirstOf()
104 bool AppendStringKeyValue(StringPiece input, in AppendStringKeyValue()
121 StringPiece remains = input.substr(end_key_pos, input.size() - end_key_pos); in AppendStringKeyValue()
123 if (begin_value_pos == StringPiece::npos) { in AppendStringKeyValue()
160 std::vector<std::string> SplitString(StringPiece input, in SplitString()
161 StringPiece separators, in SplitString()
168 return SplitStringT<std::string, std::string, StringPiece>( in SplitString()
[all …]
Dstring_piece.h38 typedef BasicStringPiece<std::string> StringPiece; typedef
52 BASE_EXPORT void CopyToString(const StringPiece& self, std::string* target);
55 BASE_EXPORT void AppendToString(const StringPiece& self, std::string* target);
58 BASE_EXPORT size_t copy(const StringPiece& self,
67 BASE_EXPORT size_t find(const StringPiece& self,
68 const StringPiece& s,
73 BASE_EXPORT size_t find(const StringPiece& self,
80 BASE_EXPORT size_t rfind(const StringPiece& self,
81 const StringPiece& s,
86 BASE_EXPORT size_t rfind(const StringPiece& self,
[all …]
Dstring_piece.cc26 inline void BuildLookupTable(const StringPiece& characters_wanted, in BuildLookupTable()
43 bool operator==(const StringPiece& x, const StringPiece& y) { in operator ==()
47 return StringPiece::wordmemcmp(x.data(), y.data(), x.size()) == 0; in operator ==()
50 std::ostream& operator<<(std::ostream& o, const StringPiece& piece) { in operator <<()
65 void CopyToString(const StringPiece& self, std::string* target) { in CopyToString()
79 void AppendToString(const StringPiece& self, std::string* target) { in AppendToString()
97 size_t copy(const StringPiece& self, char* buf, size_t n, size_t pos) { in copy()
119 size_t find(const StringPiece& self, const StringPiece& s, size_t pos) { in find()
140 size_t find(const StringPiece& self, char c, size_t pos) { in find()
166 size_t rfind(const StringPiece& self, const StringPiece& s, size_t pos) { in rfind()
[all …]
Dstring_split.h47 StringPiece input,
48 StringPiece separators,
69 BASE_EXPORT std::vector<StringPiece> SplitStringPiece(
70 StringPiece input,
71 StringPiece separators,
86 BASE_EXPORT bool SplitStringIntoKeyValuePairs(StringPiece input,
100 BASE_EXPORT void SplitStringUsingSubstr(StringPiece input,
101 StringPiece delimiter,
121 BASE_EXPORT std::vector<StringPiece> SplitStringPieceUsingSubstr(
122 StringPiece input,
[all …]
Dstring_number_conversions.h72 BASE_EXPORT bool StringToInt(const StringPiece& input, int* output);
75 BASE_EXPORT bool StringToUint(const StringPiece& input, unsigned* output);
78 BASE_EXPORT bool StringToInt64(const StringPiece& input, int64_t* output);
81 BASE_EXPORT bool StringToUint64(const StringPiece& input, uint64_t* output);
84 BASE_EXPORT bool StringToSizeT(const StringPiece& input, size_t* output);
111 BASE_EXPORT bool HexStringToInt(const StringPiece& input, int* output);
117 BASE_EXPORT bool HexStringToUInt(const StringPiece& input, uint32_t* output);
122 BASE_EXPORT bool HexStringToInt64(const StringPiece& input, int64_t* output);
128 BASE_EXPORT bool HexStringToUInt64(const StringPiece& input, uint64_t* output);
/external/icu/icu4c/source/common/unicode/
Dstringpiece.h52 class U_COMMON_API StringPiece : public UMemory {
62 StringPiece() : ptr_(NULL), length_(0) { } in StringPiece() function
68 StringPiece(const char* str);
74 StringPiece(const std::string& str) in StringPiece() function
83 StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { } in StringPiece() function
90 StringPiece(const StringPiece& x, int32_t pos);
99 StringPiece(const StringPiece& x, int32_t pos, int32_t len);
196 StringPiece substr(int32_t pos, int32_t len = npos) const {
197 return StringPiece(*this, pos, len);
209 operator==(const StringPiece& x, const StringPiece& y);
[all …]
/external/regex-re2/util/
Dstringpiece.cc8 using re2::StringPiece;
10 std::ostream& operator<<(std::ostream& o, const StringPiece& piece) { in operator <<()
15 bool StringPiece::_equal(const StringPiece& x, const StringPiece& y) { in _equal()
32 void StringPiece::CopyToString(string* target) const { in CopyToString()
36 int StringPiece::copy(char* buf, size_type n, size_type pos) const { in copy()
42 int StringPiece::find(const StringPiece& s, size_type pos) const { in find()
52 int StringPiece::find(char c, size_type pos) const { in find()
60 int StringPiece::rfind(const StringPiece& s, size_type pos) const { in rfind()
70 int StringPiece::rfind(char c, size_type pos) const { in rfind()
81 StringPiece StringPiece::substr(size_type pos, size_type n) const { in substr()
[all …]
/external/icu/icu4c/source/common/
Dstringpiece.cpp16 StringPiece::StringPiece(const char* str) in StringPiece() function in StringPiece
19 StringPiece::StringPiece(const StringPiece& x, int32_t pos) { in StringPiece() function in StringPiece
29 StringPiece::StringPiece(const StringPiece& x, int32_t pos, int32_t len) { in StringPiece() function in StringPiece
44 void StringPiece::set(const char* str) { in set()
53 operator==(const StringPiece& x, const StringPiece& y) { in operator ==()
71 const int32_t StringPiece::npos = 0x7fffffff;
/external/libchrome/base/trace_event/
Dtrace_event_argument.h37 void SetString(const char* name, base::StringPiece value);
43 void SetIntegerWithCopiedName(base::StringPiece name, int value);
44 void SetDoubleWithCopiedName(base::StringPiece name, double value);
45 void SetBooleanWithCopiedName(base::StringPiece name, bool value);
46 void SetStringWithCopiedName(base::StringPiece name,
47 base::StringPiece value);
48 void SetValueWithCopiedName(base::StringPiece name,
50 void BeginDictionaryWithCopiedName(base::StringPiece name);
51 void BeginArrayWithCopiedName(base::StringPiece name);
56 void AppendString(base::StringPiece);
[all …]
/external/pcre/dist/
Dpcre_stringpiece_unittest.cc27 using pcrecpp::StringPiece;
34 StringPiece p1(s1); in CheckSTLComparator()
35 StringPiece p2(s2); in CheckSTLComparator()
36 StringPiece p3(s3); in CheckSTLComparator()
38 typedef std::map<StringPiece, int> TestMap; in CheckSTLComparator()
75 CHECK( (StringPiece((x)) op StringPiece((y)))); \ in CheckComparisonOperators()
76 CHECK( (StringPiece((x)).compare(StringPiece((y))) op 0)) in CheckComparisonOperators()
79 CHECK(!(StringPiece((x)) op StringPiece((y)))); \ in CheckComparisonOperators()
80 CHECK(!(StringPiece((x)).compare(StringPiece((y))) op 0)) in CheckComparisonOperators()
Dpcre_stringpiece.h61 class PCRECPP_EXP_DEFN StringPiece {
70 StringPiece() in StringPiece() function
72 StringPiece(const char* str) in StringPiece() function
74 StringPiece(const unsigned char* str) in StringPiece() function
77 StringPiece(const string& str) in StringPiece() function
79 StringPiece(const char* offset, int len) in StringPiece() function
114 bool operator==(const StringPiece& x) const {
118 bool operator!=(const StringPiece& x) const {
123 bool operator cmp (const StringPiece& x) const { \
133 int compare(const StringPiece& x) const { in compare()
[all …]
/external/pcre/
Dpcre_stringpiece.h61 class PCRECPP_EXP_DEFN StringPiece {
70 StringPiece() in StringPiece() function
72 StringPiece(const char* str) in StringPiece() function
74 StringPiece(const unsigned char* str) in StringPiece() function
77 StringPiece(const string& str) in StringPiece() function
79 StringPiece(const char* offset, int len) in StringPiece() function
114 bool operator==(const StringPiece& x) const {
118 bool operator!=(const StringPiece& x) const {
123 bool operator cmp (const StringPiece& x) const { \
133 int compare(const StringPiece& x) const { in compare()
[all …]
/external/libchrome/base/
Dvlog.cc88 base::StringPiece GetModule(const base::StringPiece& file) { in GetModule()
89 base::StringPiece module(file); in GetModule()
90 base::StringPiece::size_type last_slash_pos = in GetModule()
92 if (last_slash_pos != base::StringPiece::npos) in GetModule()
94 base::StringPiece::size_type extension_start = module.rfind('.'); in GetModule()
105 int VlogInfo::GetVlogLevel(const base::StringPiece& file) const { in GetVlogLevel()
107 base::StringPiece module(GetModule(file)); in GetVlogLevel()
110 base::StringPiece target( in GetVlogLevel()
128 bool MatchVlogPattern(const base::StringPiece& string, in MatchVlogPattern()
129 const base::StringPiece& vlog_pattern) { in MatchVlogPattern()
[all …]

123456789