Home
last modified time | relevance | path

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

12345678910>>...36

/external/chromium_org/base/strings/
Dstring_piece.cc23 bool operator==(const StringPiece& x, const StringPiece& y) { in operator ==()
27 return StringPiece::wordmemcmp(x.data(), y.data(), x.size()) == 0; in operator ==()
30 std::ostream& operator<<(std::ostream& o, const StringPiece& piece) { in operator <<()
36 void CopyToString(const StringPiece& self, std::string* target) { in CopyToString()
40 void AppendToString(const StringPiece& self, std::string* target) { in AppendToString()
45 StringPiece::size_type copy(const StringPiece& self, in copy()
47 StringPiece::size_type n, in copy()
48 StringPiece::size_type pos) { in copy()
49 StringPiece::size_type ret = std::min(self.size() - pos, n); in copy()
54 StringPiece::size_type find(const StringPiece& self, in find()
[all …]
Dstring_piece_unittest.cc197 StringPiece a("abcdefghijklmnopqrstuvwxyz"); in TEST()
198 StringPiece b("abc"); in TEST()
199 StringPiece c("xyz"); in TEST()
200 StringPiece d("foobar"); in TEST()
202 StringPiece e; in TEST()
206 StringPiece f(temp); in TEST()
225 ASSERT_EQ(StringPiece::npos, std::string::npos); in TEST()
228 ASSERT_EQ(a.find(b, 1), StringPiece::npos); in TEST()
231 ASSERT_EQ(a.find(c, StringPiece::npos), StringPiece::npos); in TEST()
232 ASSERT_EQ(b.find(c), StringPiece::npos); in TEST()
[all …]
/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 …]
/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 …]
/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 …]
/external/chromium_org/net/cert/
Dasn1_util.cc11 bool ParseElement(base::StringPiece* in, in ParseElement()
13 base::StringPiece* out, in ParseElement()
25 *out = base::StringPiece(); in ParseElement()
38 *out = base::StringPiece(); in ParseElement()
79 *out = base::StringPiece(in->data(), len); in ParseElement()
84 bool GetElement(base::StringPiece* in, in GetElement()
86 base::StringPiece* out) { in GetElement()
98 static bool SeekToSPKI(base::StringPiece* cert) { in SeekToSPKI()
114 base::StringPiece certificate; in SeekToSPKI()
122 base::StringPiece tbs_certificate; in SeekToSPKI()
[all …]
/external/chromium_org/third_party/re2/re2/
Dstringpiece.h32 class StringPiece {
41 StringPiece() : ptr_(NULL), length_(0) { } in StringPiece() function
42 StringPiece(const char* str) in StringPiece() function
44 StringPiece(const std::string& str) in StringPiece() function
46 StringPiece(const char* offset, int len) : ptr_(offset), length_(len) { } in StringPiece() function
82 int compare(const StringPiece& x) const { in compare()
107 bool starts_with(const StringPiece& x) const { in starts_with()
113 bool ends_with(const StringPiece& x) const { in ends_with()
144 int find(const StringPiece& s, size_type pos = 0) const;
146 int rfind(const StringPiece& s, size_type pos = npos) const;
[all …]
/external/chromium_org/net/tools/balsa/
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;
398 base::StringPiece(stream_begin + line.first_char_idx, in Lookup()
400 base::StringPiece(stream_begin + line.value_begin_idx, in Lookup()
555 const base::StringPiece& key);
565 base::StringPiece key_;
623 void HackHeader(const base::StringPiece& key, const base::StringPiece& value);
634 void HackAppendToHeader(const base::StringPiece& key,
[all …]
Dstring_piece_utils.h16 size_t operator()(const base::StringPiece& sp) const { in operator()
19 for (base::StringPiece::const_iterator it = sp.begin(); in operator()
28 static bool EqualIgnoreCase(const base::StringPiece& piece1, in EqualIgnoreCase()
29 const base::StringPiece& piece2) { in EqualIgnoreCase()
30 base::StringPiece::const_iterator p1i = piece1.begin(); in EqualIgnoreCase()
31 base::StringPiece::const_iterator p2i = piece2.begin(); in EqualIgnoreCase()
46 static void RemoveWhitespaceContext(base::StringPiece* piece1) { in RemoveWhitespaceContext()
47 base::StringPiece::const_iterator c = piece1->begin(); in RemoveWhitespaceContext()
48 base::StringPiece::const_iterator e = piece1->end(); in RemoveWhitespaceContext()
53 *piece1 = base::StringPiece(c, e-c); in RemoveWhitespaceContext()
[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 …]
/external/chromium_org/third_party/libphonenumber/src/phonenumbers/base/strings/
Dstring_piece.h29 class 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.cc14 typedef StringPiece::size_type size_type;
16 std::ostream& operator<<(std::ostream& o, const StringPiece& piece) { in operator <<()
21 bool operator==(const StringPiece& x, const StringPiece& y) { in operator ==()
25 return StringPiece::wordmemcmp(x.data(), y.data(), x.size()) == 0; in operator ==()
28 void StringPiece::CopyToString(std::string* target) const { in CopyToString()
32 void StringPiece::AppendToString(std::string* target) const { in AppendToString()
37 size_type StringPiece::copy(char* buf, size_type n, size_type pos) const { in copy()
43 size_type StringPiece::find(const StringPiece& s, size_type pos) const { in find()
53 size_type StringPiece::find(char c, size_type pos) const { in find()
61 size_type StringPiece::rfind(const StringPiece& s, size_type pos) const { in rfind()
[all …]
/external/chromium_org/third_party/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 …]
/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 …]
/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/chromium_org/third_party/icu/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 U_STD_NSQ 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/chromium_org/content/child/
Dsite_isolation_policy_unittest.cc13 using base::StringPiece;
73 StringPiece html_data(" \t\r\n <HtMladfokadfkado"); in TEST()
74 StringPiece comment_html_data(" <!-- this is comment --> <html><body>"); in TEST()
75 StringPiece two_comments_html_data( in TEST()
77 StringPiece mixed_comments_html_data( in TEST()
79 StringPiece non_html_data(" var name=window.location;\nadfadf"); in TEST()
80 StringPiece comment_js_data(" <!-- this is comment -> document.write(1); "); in TEST()
81 StringPiece empty_data(""); in TEST()
95 StringPiece xml_data(" \t \r \n <?xml version=\"1.0\"?>\n <catalog"); in TEST()
96 StringPiece non_xml_data(" var name=window.location;\nadfadf"); in TEST()
[all …]
Dsite_isolation_policy.cc28 using base::StringPiece;
79 bool MatchesSignature(StringPiece data, in MatchesSignature()
80 const StringPiece signatures[], in MatchesSignature()
85 if (offset == base::StringPiece::npos) in MatchesSignature()
92 const StringPiece& signature = signatures[sig_index]; in MatchesSignature()
267 StringPiece data(raw_data, raw_length); in ShouldBlockResponse()
453 bool SiteIsolationPolicy::SniffForHTML(StringPiece data) { in SniffForHTML()
466 static const StringPiece kHtmlSignatures[] = { in SniffForHTML()
467 StringPiece("<!DOCTYPE html"), // HTML5 spec in SniffForHTML()
468 StringPiece("<script"), // HTML5 spec, Mozilla in SniffForHTML()
[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/chromium_org/third_party/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/chromium_org/crypto/
Dhkdf.h33 HKDF(const base::StringPiece& secret,
34 const base::StringPiece& salt,
35 const base::StringPiece& info,
40 base::StringPiece client_write_key() const { in client_write_key()
43 base::StringPiece client_write_iv() const { in client_write_iv()
46 base::StringPiece server_write_key() const { in server_write_key()
49 base::StringPiece server_write_iv() const { in server_write_iv()
56 base::StringPiece client_write_key_;
57 base::StringPiece server_write_key_;
58 base::StringPiece client_write_iv_;
[all …]
/external/chromium_org/net/quic/crypto/
Dnull_encrypter.cc9 using base::StringPiece;
18 bool NullEncrypter::SetKey(StringPiece key) { return key.empty(); } in SetKey()
20 bool NullEncrypter::SetNoncePrefix(StringPiece nonce_prefix) { in SetNoncePrefix()
25 StringPiece /*nonce*/, in Encrypt() argument
26 StringPiece associated_data, in Encrypt()
27 StringPiece plaintext, in Encrypt()
39 StringPiece associated_data, in EncryptPacket()
40 StringPiece plaintext) { in EncryptPacket()
43 Encrypt(StringPiece(), associated_data, plaintext, buffer); in EncryptPacket()
59 StringPiece NullEncrypter::GetKey() const { return StringPiece(); } in GetKey()
[all …]

12345678910>>...36