Home
last modified time | relevance | path

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

12345678910>>...12

/external/protobuf/src/google/protobuf/stubs/
Dstringpiece_unittest.cc45 TEST(StringPiece, Ctor) { in TEST() argument
48 StringPiece s10; in TEST()
56 StringPiece s20(hello); in TEST()
61 StringPiece s21(hello, 4); in TEST()
66 StringPiece s22(hello, 6); in TEST()
74 StringPiece s30(hola); in TEST()
82 StringPiece s31(hola); in TEST()
91 StringPiece s40(bonjour); in TEST()
102 TEST(StringPiece, STLComparator) { in TEST() argument
107 StringPiece p1(s1); in TEST()
[all …]
Dstringpiece.h178 class LIBPROTOBUF_EXPORT StringPiece {
210 StringPiece() : ptr_(NULL), length_(0) {} in StringPiece() function
212 StringPiece(const char* str) // NOLINT(runtime/explicit) in StringPiece() function
220 StringPiece( // NOLINT(runtime/explicit) in StringPiece() function
227 StringPiece( // NOLINT(runtime/explicit) in StringPiece() function
234 StringPiece(const char* offset, stringpiece_ssize_type len) in StringPiece() function
241 StringPiece(StringPiece x, stringpiece_ssize_type pos);
245 StringPiece(StringPiece x,
300 int compare(StringPiece x) const { in compare()
331 bool starts_with(StringPiece x) const { in starts_with()
[all …]
Dstringpiece.cc40 std::ostream& operator<<(std::ostream& o, StringPiece piece) { in operator <<()
46 void StringPiece::LogFatalSizeTooBig(size_t size, const char* details) { in LogFatalSizeTooBig()
50 StringPiece::StringPiece(StringPiece x, stringpiece_ssize_type pos) in StringPiece() function in google::protobuf::StringPiece
56 StringPiece::StringPiece(StringPiece x, in StringPiece() function in google::protobuf::StringPiece
65 void StringPiece::CopyToString(string* target) const { in CopyToString()
69 void StringPiece::AppendToString(string* target) const { in AppendToString()
73 bool StringPiece::Consume(StringPiece x) { in Consume()
82 bool StringPiece::ConsumeFromEnd(StringPiece x) { in ConsumeFromEnd()
90 stringpiece_ssize_type StringPiece::copy(char* buf, in copy()
98 bool StringPiece::contains(StringPiece s) const { in contains()
[all …]
/external/protobuf/src/google/protobuf/util/internal/
Djson_stream_parser_test.cc89 util::Status RunTest(StringPiece json, int split, bool coerce_utf8 = false) { in RunTest()
96 StringPiece single = json.substr(i, 1); in RunTest()
106 StringPiece first = json.substr(0, split); in RunTest()
107 StringPiece rest = json.substr(split); in RunTest()
119 void DoTest(StringPiece json, int split, bool coerce_utf8 = false) { in DoTest()
127 void DoErrorTest(StringPiece json, int split, StringPiece error_prefix, in DoErrorTest()
131 StringPiece error_message(result.error_message()); in DoErrorTest()
145 StringPiece str = "true"; in TEST_F()
153 StringPiece str = "false"; in TEST_F()
161 StringPiece str = "null"; in TEST_F()
[all …]
Dprotostream_objectwriter_test.cc375 EXPECT_CALL(listener_, InvalidValue(_, StringPiece("TYPE_INT32"), in TEST_P()
376 StringPiece("\"Infinity\""))) in TEST_P()
378 EXPECT_CALL(listener_, InvalidValue(_, StringPiece("TYPE_UINT32"), in TEST_P()
379 StringPiece("\"Infinity\""))) in TEST_P()
381 EXPECT_CALL(listener_, InvalidValue(_, StringPiece("TYPE_SFIXED64"), in TEST_P()
382 StringPiece("\"-Infinity\""))) in TEST_P()
384 EXPECT_CALL(listener_, InvalidValue(_, StringPiece("TYPE_BOOL"), in TEST_P()
385 StringPiece("\"Infinity\""))) in TEST_P()
408 EXPECT_CALL(listener_, InvalidValue(_, StringPiece("TYPE_INT32"), in TEST_P()
409 StringPiece("\"NaN\""))) in TEST_P()
[all …]
Dexpecting_objectwriter.h73 MOCK_METHOD1(StartObject, ObjectWriter*(StringPiece));
75 MOCK_METHOD1(StartList, ObjectWriter*(StringPiece));
77 MOCK_METHOD2(RenderBool, ObjectWriter*(StringPiece, bool));
78 MOCK_METHOD2(RenderInt32, ObjectWriter*(StringPiece, int32));
79 MOCK_METHOD2(RenderUint32, ObjectWriter*(StringPiece, uint32));
80 MOCK_METHOD2(RenderInt64, ObjectWriter*(StringPiece, int64));
81 MOCK_METHOD2(RenderUint64, ObjectWriter*(StringPiece, uint64));
82 MOCK_METHOD2(RenderDouble, ObjectWriter*(StringPiece, double));
83 MOCK_METHOD2(RenderFloat, ObjectWriter*(StringPiece, float));
84 MOCK_METHOD2(RenderString, ObjectWriter*(StringPiece, StringPiece));
[all …]
Dobject_writer.h63 virtual ObjectWriter* StartObject(StringPiece name) = 0;
69 virtual ObjectWriter* StartList(StringPiece name) = 0;
75 virtual ObjectWriter* RenderBool(StringPiece name, bool value) = 0;
78 virtual ObjectWriter* RenderInt32(StringPiece name, int32 value) = 0;
81 virtual ObjectWriter* RenderUint32(StringPiece name, uint32 value) = 0;
84 virtual ObjectWriter* RenderInt64(StringPiece name, int64 value) = 0;
87 virtual ObjectWriter* RenderUint64(StringPiece name, uint64 value) = 0;
90 virtual ObjectWriter* RenderDouble(StringPiece name, double value) = 0;
93 virtual ObjectWriter* RenderFloat(StringPiece name, float value) = 0;
96 virtual ObjectWriter* RenderString(StringPiece name, StringPiece value) = 0;
[all …]
Dprotostream_objectsource.h83 virtual util::Status NamedWriteTo(StringPiece name, ObjectWriter* ow) const;
127 StringPiece name, const uint32 end_tag,
138 StringPiece, ObjectWriter*);
151 StringPiece name, uint32 list_tag,
157 StringPiece name, uint32 list_tag,
169 StringPiece name, ObjectWriter* ow);
174 StringPiece name, ObjectWriter* ow);
180 StringPiece name, ObjectWriter* ow);
183 StringPiece name, ObjectWriter* ow);
186 StringPiece name, ObjectWriter* ow);
[all …]
Djson_objectwriter.h90 JsonObjectWriter(StringPiece indent_string, in JsonObjectWriter()
100 virtual JsonObjectWriter* StartObject(StringPiece name);
102 virtual JsonObjectWriter* StartList(StringPiece name);
104 virtual JsonObjectWriter* RenderBool(StringPiece name, bool value);
105 virtual JsonObjectWriter* RenderInt32(StringPiece name, int32 value);
106 virtual JsonObjectWriter* RenderUint32(StringPiece name, uint32 value);
107 virtual JsonObjectWriter* RenderInt64(StringPiece name, int64 value);
108 virtual JsonObjectWriter* RenderUint64(StringPiece name, uint64 value);
109 virtual JsonObjectWriter* RenderDouble(StringPiece name, double value);
110 virtual JsonObjectWriter* RenderFloat(StringPiece name, float value);
[all …]
Dproto_writer.h83 virtual ProtoWriter* StartObject(StringPiece name);
85 virtual ProtoWriter* StartList(StringPiece name);
87 virtual ProtoWriter* RenderBool(StringPiece name, bool value) { in RenderBool()
90 virtual ProtoWriter* RenderInt32(StringPiece name, int32 value) { in RenderInt32()
93 virtual ProtoWriter* RenderUint32(StringPiece name, uint32 value) { in RenderUint32()
96 virtual ProtoWriter* RenderInt64(StringPiece name, int64 value) { in RenderInt64()
99 virtual ProtoWriter* RenderUint64(StringPiece name, uint64 value) { in RenderUint64()
102 virtual ProtoWriter* RenderDouble(StringPiece name, double value) { in RenderDouble()
105 virtual ProtoWriter* RenderFloat(StringPiece name, float value) { in RenderFloat()
108 virtual ProtoWriter* RenderString(StringPiece name, StringPiece value) { in RenderString()
[all …]
Djson_objectwriter.cc57 JsonObjectWriter* JsonObjectWriter::StartObject(StringPiece name) { in StartObject()
71 JsonObjectWriter* JsonObjectWriter::StartList(StringPiece name) { in StartList()
85 JsonObjectWriter* JsonObjectWriter::RenderBool(StringPiece name, bool value) { in RenderBool()
89 JsonObjectWriter* JsonObjectWriter::RenderInt32(StringPiece name, int32 value) { in RenderInt32()
93 JsonObjectWriter* JsonObjectWriter::RenderUint32(StringPiece name, in RenderUint32()
98 JsonObjectWriter* JsonObjectWriter::RenderInt64(StringPiece name, int64 value) { in RenderInt64()
106 JsonObjectWriter* JsonObjectWriter::RenderUint64(StringPiece name, in RenderUint64()
115 JsonObjectWriter* JsonObjectWriter::RenderDouble(StringPiece name, in RenderDouble()
125 JsonObjectWriter* JsonObjectWriter::RenderFloat(StringPiece name, float value) { in RenderFloat()
134 JsonObjectWriter* JsonObjectWriter::RenderString(StringPiece name, in RenderString()
[all …]
Dtype_info.cc62 StringPiece type_url) const { in ResolveTypeUrl()
63 map<StringPiece, StatusOrType>::iterator it = cached_types_.find(type_url); in ResolveTypeUrl()
81 StringPiece type_url) const { in GetTypeByTypeUrl()
87 StringPiece type_url) const { in GetEnumByTypeUrl()
88 map<StringPiece, StatusOrEnum>::iterator it = cached_enums_.find(type_url); in GetEnumByTypeUrl()
107 const google::protobuf::Type* type, StringPiece camel_case_name) const { in FindField()
112 StringPiece name = in FindField()
113 FindWithDefault(camel_case_name_table_, camel_case_name, StringPiece()); in FindField()
126 static void DeleteCachedTypes(map<StringPiece, T>* cached_types) { in DeleteCachedTypes() argument
127 for (typename map<StringPiece, T>::iterator it = cached_types->begin(); in DeleteCachedTypes()
[all …]
Derror_listener.h60 StringPiece unknown_name, StringPiece message) = 0;
64 StringPiece type_name, StringPiece value) = 0;
68 StringPiece missing_name) = 0;
85 StringPiece unknown_name, StringPiece message) {} in InvalidName()
88 StringPiece type_name, StringPiece value) {} in InvalidValue()
91 StringPiece missing_name) {} in MissingField()
Ddefault_value_objectwriter.h89 virtual DefaultValueObjectWriter* StartObject(StringPiece name);
93 virtual DefaultValueObjectWriter* StartList(StringPiece name);
97 virtual DefaultValueObjectWriter* RenderBool(StringPiece name, bool value);
99 virtual DefaultValueObjectWriter* RenderInt32(StringPiece name, int32 value);
101 virtual DefaultValueObjectWriter* RenderUint32(StringPiece name,
104 virtual DefaultValueObjectWriter* RenderInt64(StringPiece name, int64 value);
106 virtual DefaultValueObjectWriter* RenderUint64(StringPiece name,
109 virtual DefaultValueObjectWriter* RenderDouble(StringPiece name,
112 virtual DefaultValueObjectWriter* RenderFloat(StringPiece name, float value);
114 virtual DefaultValueObjectWriter* RenderString(StringPiece name,
[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/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/icu/icu4c/source/common/unicode/
Dstringpiece.h54 class U_COMMON_API StringPiece : public UMemory {
64 StringPiece() : ptr_(NULL), length_(0) { } in StringPiece() function
70 StringPiece(const char* str);
76 StringPiece(const std::string& str) in StringPiece() function
85 StringPiece(const char* offset, int32_t len) : ptr_(offset), length_(len) { } in StringPiece() function
92 StringPiece(const StringPiece& x, int32_t pos);
101 StringPiece(const StringPiece& x, int32_t pos, int32_t len);
198 StringPiece substr(int32_t pos, int32_t len = npos) const {
199 return StringPiece(*this, pos, len);
211 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/libchrome/base/strings/
Dstring_util.h113 BASE_EXPORT std::string ToLowerASCII(StringPiece str);
117 BASE_EXPORT std::string ToUpperASCII(StringPiece str);
142 BASE_EXPORT int CompareCaseInsensitiveASCII(StringPiece a, StringPiece b);
148 BASE_EXPORT bool EqualsCaseInsensitiveASCII(StringPiece a, StringPiece b);
185 const StringPiece& remove_chars,
198 const StringPiece& replace_chars,
218 StringPiece trim_chars,
226 BASE_EXPORT StringPiece TrimString(StringPiece input,
227 const StringPiece& trim_chars,
251 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.h37 typedef BasicStringPiece<std::string> StringPiece; typedef
51 BASE_EXPORT void CopyToString(const StringPiece& self, std::string* target);
54 BASE_EXPORT void AppendToString(const StringPiece& self, std::string* target);
57 BASE_EXPORT size_t copy(const StringPiece& self,
66 BASE_EXPORT size_t find(const StringPiece& self,
67 const StringPiece& s,
72 BASE_EXPORT size_t find(const StringPiece& self,
79 BASE_EXPORT size_t rfind(const StringPiece& self,
80 const StringPiece& s,
85 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 …]
/external/icu/icu4c/source/common/
Dstringpiece.cpp18 StringPiece::StringPiece(const char* str) in StringPiece() function in StringPiece
21 StringPiece::StringPiece(const StringPiece& x, int32_t pos) { in StringPiece() function in StringPiece
31 StringPiece::StringPiece(const StringPiece& x, int32_t pos, int32_t len) { in StringPiece() function in StringPiece
46 void StringPiece::set(const char* str) { in set()
55 operator==(const StringPiece& x, const StringPiece& y) { in operator ==()
73 const int32_t StringPiece::npos = 0x7fffffff;
/external/libchrome/base/trace_event/
Dtrace_event_argument.h38 void SetString(const char* name, base::StringPiece value);
44 void SetIntegerWithCopiedName(base::StringPiece name, int value);
45 void SetDoubleWithCopiedName(base::StringPiece name, double value);
46 void SetBooleanWithCopiedName(base::StringPiece name, bool value);
47 void SetStringWithCopiedName(base::StringPiece name,
48 base::StringPiece value);
49 void SetValueWithCopiedName(base::StringPiece name,
51 void BeginDictionaryWithCopiedName(base::StringPiece name);
52 void BeginArrayWithCopiedName(base::StringPiece name);
57 void AppendString(base::StringPiece);
[all …]

12345678910>>...12