Home
last modified time | relevance | path

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

123456789

/external/chromium/base/
Dstring_piece_unittest.cc15 ASSERT_TRUE( (StringPiece((x)) op StringPiece((y)))); \ in TEST()
16 ASSERT_TRUE( (StringPiece((x)).compare(StringPiece((y))) op 0)) in TEST()
19 ASSERT_FALSE(StringPiece((x)) op StringPiece((y))); \ in TEST()
20 ASSERT_FALSE(StringPiece((x)).compare(StringPiece((y))) op 0) in TEST()
97 StringPiece a("abcdefghijklmnopqrstuvwxyz"); in TEST()
98 StringPiece b("abc"); in TEST()
99 StringPiece c("xyz"); in TEST()
100 StringPiece d("foobar"); in TEST()
101 StringPiece e; in TEST()
105 StringPiece f(temp); in TEST()
[all …]
Dstring_piece.h29 class BASE_API StringPiece {
49 StringPiece() : ptr_(NULL), length_(0) { } in StringPiece() function
50 StringPiece(const char* str) in StringPiece() function
52 StringPiece(const std::string& str) in StringPiece() function
54 StringPiece(const char* offset, size_type len) in StringPiece() function
94 int compare(const StringPiece& x) const { in compare()
113 bool starts_with(const StringPiece& x) const { in starts_with()
119 bool ends_with(const StringPiece& x) const { in ends_with()
138 size_type find(const StringPiece& s, size_type pos = 0) const;
140 size_type rfind(const StringPiece& s, size_type pos = npos) const;
[all …]
Dstring_piece.cc13 typedef StringPiece::size_type size_type;
15 bool operator==(const StringPiece& x, const StringPiece& y) { in operator ==()
19 return StringPiece::wordmemcmp(x.data(), y.data(), x.size()) == 0; in operator ==()
22 void StringPiece::CopyToString(std::string* target) const { in CopyToString()
26 void StringPiece::AppendToString(std::string* target) const { in AppendToString()
31 size_type StringPiece::copy(char* buf, size_type n, size_type pos) const { in copy()
37 size_type StringPiece::find(const StringPiece& s, size_type pos) const { in find()
47 size_type StringPiece::find(char c, size_type pos) const { in find()
55 size_type StringPiece::rfind(const StringPiece& s, size_type pos) const { in rfind()
67 size_type StringPiece::rfind(char c, size_type pos) const { in rfind()
[all …]
Dvlog.cc84 base::StringPiece GetModule(const base::StringPiece& file) { in GetModule()
85 base::StringPiece module(file); in GetModule()
86 base::StringPiece::size_type last_slash_pos = in GetModule()
88 if (last_slash_pos != base::StringPiece::npos) in GetModule()
90 base::StringPiece::size_type extension_start = module.rfind('.'); in GetModule()
101 int VlogInfo::GetVlogLevel(const base::StringPiece& file) const { in GetVlogLevel()
103 base::StringPiece module(GetModule(file)); in GetVlogLevel()
106 base::StringPiece target( in GetVlogLevel()
124 bool MatchVlogPattern(const base::StringPiece& string, in MatchVlogPattern()
125 const base::StringPiece& vlog_pattern) { in MatchVlogPattern()
[all …]
/external/chromium/net/base/
Ddnssec_chain_verifier.h40 const base::StringPiece& chain);
55 const std::vector<base::StringPiece>& rrdatas() const;
62 ParseTLSTXTRecord(base::StringPiece rrdata);
65 static unsigned MatchingLabels(base::StringPiece a,
66 base::StringPiece b);
73 bool VariableLength16(base::StringPiece*);
74 bool ReadName(base::StringPiece*);
76 bool ReadAheadEntryKey(base::StringPiece*);
77 bool ReadAheadKey(base::StringPiece*, uint8 entry_key);
78 bool ReadDNSKEYs(std::vector<base::StringPiece>*, bool is_root);
[all …]
Ddnssec_keyset.h24 bool AddKey(const base::StringPiece& dnskey);
32 bool CheckSignature(const base::StringPiece& name,
33 const base::StringPiece& zone,
34 const base::StringPiece& signature,
36 const std::vector<base::StringPiece>& rrdatas);
40 static uint16 DNSKEYToKeyID(const base::StringPiece& dnskey);
48 base::StringPiece signature_algorithm,
49 base::StringPiece signature,
50 base::StringPiece public_key,
51 base::StringPiece signed_data);
[all …]
Ddnssec_chain_verifier.cc145 unsigned CountLabels(base::StringPiece a) { in CountLabels()
158 void RemoveLeadingLabel(base::StringPiece* a) { in RemoveLeadingLabel()
171 base::StringPiece name;
180 const base::StringPiece& chain) in DNSSECChainVerifier()
215 base::StringPiece next_name; in Verify()
242 const std::vector<base::StringPiece>& DNSSECChainVerifier::rrdatas() const { in rrdatas()
249 DNSSECChainVerifier::ParseTLSTXTRecord(base::StringPiece rrdata) { in ParseTLSTXTRecord()
342 unsigned DNSSECChainVerifier::MatchingLabels(base::StringPiece a, in MatchingLabels()
343 base::StringPiece b) { in MatchingLabels()
405 bool DNSSECChainVerifier::VariableLength16(base::StringPiece* v) { in VariableLength16()
[all …]
Dpem_tokenizer.cc21 using base::StringPiece;
30 const StringPiece& str, in PEMTokenizer()
39 while (pos_ != StringPiece::npos) { in GetNext()
42 if (pos_ == StringPiece::npos) in GetNext()
53 StringPiece::size_type footer_pos = str_.find(it->footer, pos_); in GetNext()
54 if (footer_pos == StringPiece::npos) { in GetNext()
55 pos_ = StringPiece::npos; in GetNext()
60 StringPiece::size_type data_begin = pos_ + it->header.size(); in GetNext()
64 StringPiece encoded = str_.substr(data_begin, in GetNext()
88 const StringPiece& str, in Init()
Dasn1_util.cc11 bool ParseElement(base::StringPiece* in, in ParseElement()
13 base::StringPiece* out, in ParseElement()
58 *out = base::StringPiece(in->data(), len); in ParseElement()
63 bool GetElement(base::StringPiece* in, in GetElement()
65 base::StringPiece* out) { in GetElement()
74 bool ExtractSPKIFromDERCert(base::StringPiece cert, in ExtractSPKIFromDERCert()
75 base::StringPiece* spki_out) { in ExtractSPKIFromDERCert()
91 base::StringPiece certificate; in ExtractSPKIFromDERCert()
95 base::StringPiece tbs_certificate; in ExtractSPKIFromDERCert()
Dasn1_util.h33 bool ParseElement(base::StringPiece* in,
35 base::StringPiece* out,
40 bool GetElement(base::StringPiece* in,
42 base::StringPiece* out);
48 bool ExtractSPKIFromDERCert(base::StringPiece cert,
49 base::StringPiece* spki_out);
/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/chromium/net/tools/flip_server/
Dbalsa_headers.h137 void WriteToContiguousBuffer(const base::StringPiece& sp);
149 base::StringPiece Write(const base::StringPiece& sp,
274 typedef std::vector<base::StringPiece> HeaderTokenList;
299 typedef std::pair<base::StringPiece, base::StringPiece> StringPiecePair;
402 base::StringPiece(stream_begin + line.first_char_idx, in Lookup()
404 base::StringPiece(stream_begin + line.value_begin_idx, in Lookup()
558 const base::StringPiece& key) in const_header_lines_key_iterator()
573 base::StringPiece key_;
631 void HackHeader(const base::StringPiece& key, const base::StringPiece& value);
642 void HackAppendToHeader(const base::StringPiece& key,
[all …]
Dstring_piece_utils.h17 size_t operator()(const base::StringPiece& sp) const { in operator()
20 for (base::StringPiece::const_iterator it = sp.begin(); in operator()
29 static bool EqualIgnoreCase(const base::StringPiece& piece1, in EqualIgnoreCase()
30 const base::StringPiece& piece2) { in EqualIgnoreCase()
31 base::StringPiece::const_iterator p1i = piece1.begin(); in EqualIgnoreCase()
32 base::StringPiece::const_iterator p2i = piece2.begin(); in EqualIgnoreCase()
45 static void RemoveWhitespaceContext(base::StringPiece* piece1) { in RemoveWhitespaceContext()
46 base::StringPiece::const_iterator c = piece1->begin(); in RemoveWhitespaceContext()
47 base::StringPiece::const_iterator e = piece1->end(); in RemoveWhitespaceContext()
52 *piece1 = base::StringPiece(c, e-c); in RemoveWhitespaceContext()
[all …]
Dbalsa_headers.cc30 __gnu_cxx::hash_set<base::StringPiece,
92 void BalsaBuffer::WriteToContiguousBuffer(const base::StringPiece& sp) { in WriteToContiguousBuffer()
121 base::StringPiece BalsaBuffer::Write(const base::StringPiece& sp, in Write()
128 return base::StringPiece(storage, sp.size()); in Write()
347 void BalsaHeaders::AddAndMakeDescription(const base::StringPiece& key, in AddAndMakeDescription()
348 const base::StringPiece& value, in AddAndMakeDescription()
373 const base::StringPiece& key, in AppendOrPrependAndMakeDescription()
374 const base::StringPiece& value, in AppendOrPrependAndMakeDescription()
383 base::StringPiece old_value(GetPtr(d->buffer_base_idx) + d->value_begin_idx, in AppendOrPrependAndMakeDescription()
392 base::StringPiece first_value = old_value; in AppendOrPrependAndMakeDescription()
[all …]
Dsplit.cc17 void SplitStringPieceToVector(const base::StringPiece& full, in SplitStringPieceToVector()
19 std::vector<base::StringPiece>* vec, in SplitStringPieceToVector()
26 base::StringPiece::const_iterator s = full.begin(); in SplitStringPieceToVector()
27 base::StringPiece::const_iterator e = s; in SplitStringPieceToVector()
31 vec->push_back(base::StringPiece(s, e - s)); in SplitStringPieceToVector()
40 vec->push_back(base::StringPiece(s, e - s)); in SplitStringPieceToVector()
44 base::StringPiece::const_iterator s = full.begin(); in SplitStringPieceToVector()
45 base::StringPiece::const_iterator e = s; in SplitStringPieceToVector()
56 vec->push_back(base::StringPiece(s, e - s)); in SplitStringPieceToVector()
65 vec->push_back(base::StringPiece(s, e - s)); in SplitStringPieceToVector()
/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/icu4c/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/icu4c/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 ==()
79 const int32_t StringPiece::npos;
/external/chromium/net/http/
Dhttp_request_headers.h26 HeaderKeyValuePair(const base::StringPiece& key,
27 const base::StringPiece& value);
84 bool HasHeader(const base::StringPiece& key) const { in HasHeader()
90 bool GetHeader(const base::StringPiece& key, std::string* out) const;
98 void SetHeader(const base::StringPiece& key, const base::StringPiece& value);
103 void SetHeaderIfMissing(const base::StringPiece& key,
104 const base::StringPiece& value);
107 void RemoveHeader(const base::StringPiece& key);
121 void AddHeaderFromString(const base::StringPiece& header_line);
126 void AddHeadersFromString(const base::StringPiece& headers);
[all …]
/external/chromium/chrome/common/
Djstemplate_builder.h21 class StringPiece; variable
29 std::string GetTemplateHtml(const base::StringPiece& html_template,
31 const base::StringPiece& template_id);
36 std::string GetI18nTemplateHtml(const base::StringPiece& html_template,
42 std::string GetTemplatesHtml(const base::StringPiece& html_template,
44 const base::StringPiece& template_id);
58 void AppendJsTemplateProcessHtml(const base::StringPiece& template_id,

123456789