Home
last modified time | relevance | path

Searched refs:string_view (Results 1 – 25 of 460) sorted by relevance

12345678910>>...19

/third_party/skia/third_party/externals/abseil-cpp/absl/strings/
Dstring_view_test.cc83 absl::string_view s10; in TEST()
91 absl::string_view s20(hello); in TEST()
96 absl::string_view s21(hello, 4); in TEST()
101 absl::string_view s22(hello, 6); in TEST()
109 absl::string_view s30(hola); in TEST()
117 absl::string_view s31(hola); in TEST()
128 absl::string_view s1(str1); in TEST()
131 absl::string_view s2(str2); in TEST()
142 absl::string_view a("a"); in TEST()
143 absl::string_view b("bbb"); in TEST()
[all …]
Dstr_split.cc41 absl::string_view GenericFind(absl::string_view text, in GenericFind()
42 absl::string_view delimiter, size_t pos, in GenericFind()
47 return absl::string_view(text.data() + pos + 1, 0); in GenericFind()
49 size_t found_pos = absl::string_view::npos; in GenericFind()
50 absl::string_view found(text.data() + text.size(), in GenericFind()
53 if (found_pos != absl::string_view::npos) { in GenericFind()
54 found = absl::string_view(text.data() + found_pos, in GenericFind()
63 size_t Find(absl::string_view text, absl::string_view delimiter, size_t pos) { in Find()
66 size_t Length(absl::string_view delimiter) { return delimiter.length(); } in Length()
72 size_t Find(absl::string_view text, absl::string_view delimiter, size_t pos) { in Find()
[all …]
Dstring_view.h52 using string_view = std::string_view; variable
166 class string_view {
184 constexpr string_view() noexcept : ptr_(nullptr), length_(0) {} in string_view() function
189 string_view( // NOLINT(runtime/explicit) in string_view() function
196 : string_view(str.data(), str.size(), SkipCheckLengthTag{}) {} in string_view()
202 constexpr string_view(const char* str) // NOLINT(runtime/explicit) in string_view() function
206 constexpr string_view(const char* data, size_type len) in string_view() function
361 ABSL_INTERNAL_STRING_VIEW_CXX14_CONSTEXPR void swap(string_view& s) noexcept { in swap()
398 constexpr string_view substr(size_type pos = 0, size_type n = npos) const {
402 string_view())
[all …]
Dstring_view.cc46 explicit LookupTable(string_view wanted) { in LookupTable()
60 std::ostream& operator<<(std::ostream& o, string_view piece) { in operator <<()
81 string_view::size_type string_view::find(string_view s, in find()
92 string_view::size_type string_view::find(char c, size_type pos) const noexcept { in find()
101 string_view::size_type string_view::rfind(string_view s, in rfind()
111 string_view::size_type string_view::rfind(char c, in rfind()
124 string_view::size_type string_view::find_first_of( in find_first_of()
125 string_view s, size_type pos) const noexcept { in find_first_of()
140 string_view::size_type string_view::find_first_not_of( in find_first_not_of()
141 string_view s, size_type pos) const noexcept { in find_first_not_of()
[all …]
Descaping.h72 bool CUnescape(absl::string_view source, std::string* dest, std::string* error);
75 inline bool CUnescape(absl::string_view source, std::string* dest) { in CUnescape()
90 std::string CEscape(absl::string_view src);
103 std::string CHexEscape(absl::string_view src);
111 std::string Utf8SafeCEscape(absl::string_view src);
118 std::string Utf8SafeCHexEscape(absl::string_view src);
125 bool Base64Unescape(absl::string_view src, std::string* dest);
132 bool WebSafeBase64Unescape(absl::string_view src, std::string* dest);
138 void Base64Escape(absl::string_view src, std::string* dest);
139 std::string Base64Escape(absl::string_view src);
[all …]
Dmatch.h46 inline bool StrContains(absl::string_view haystack, in StrContains()
47 absl::string_view needle) noexcept { in StrContains()
51 inline bool StrContains(absl::string_view haystack, char needle) noexcept { in StrContains()
58 inline bool StartsWith(absl::string_view text, in StartsWith()
59 absl::string_view prefix) noexcept { in StartsWith()
68 inline bool EndsWith(absl::string_view text, in EndsWith()
69 absl::string_view suffix) noexcept { in EndsWith()
80 bool EqualsIgnoreCase(absl::string_view piece1,
81 absl::string_view piece2) noexcept;
87 bool StartsWithIgnoreCase(absl::string_view text,
[all …]
Dstr_split.h126 explicit ByString(absl::string_view sp);
127 absl::string_view Find(absl::string_view text, size_t pos) const;
159 absl::string_view Find(absl::string_view text, size_t pos) const;
184 explicit ByAnyChar(absl::string_view sp);
185 absl::string_view Find(absl::string_view text, size_t pos) const;
216 absl::string_view Find(absl::string_view text, size_t pos) const;
249 struct SelectDelimiter<absl::string_view> {
263 absl::string_view Find(absl::string_view text, size_t pos) {
265 return absl::string_view(text.data() + text.size(),
330 bool operator()(absl::string_view) const { return true; }
[all …]
Dstr_split_test.cc56 std::vector<absl::string_view>>::value, in TEST()
62 std::map<absl::string_view, absl::string_view>>::value, in TEST()
111 std::vector<absl::string_view> v = absl::StrSplit("a,b,c", ','); in TEST()
226 for (absl::string_view sp : absl::StrSplit(s, ',')) { in TEST()
235 for (absl::string_view sp : absl::StrSplit(s, ',', SkipWhitespace())) { in TEST()
246 for (absl::string_view sp : absl::StrSplit("a=b=c,d=e,f=,g", ',')) { in TEST()
279 bool operator()(absl::string_view sp) { return sp != s_; } in operator ()()
340 EXPECT_THAT(absl::StrSplit(absl::string_view(""), '-'), ElementsAre("")); in TEST()
341 EXPECT_THAT(absl::StrSplit(absl::string_view(), '-'), ElementsAre()); in TEST()
358 std::vector<absl::string_view> v; in TEST()
[all …]
Dstrip.h45 inline bool ConsumePrefix(absl::string_view* str, absl::string_view expected) { in ConsumePrefix()
60 inline bool ConsumeSuffix(absl::string_view* str, absl::string_view expected) { in ConsumeSuffix()
71 ABSL_MUST_USE_RESULT inline absl::string_view StripPrefix( in StripPrefix()
72 absl::string_view str, absl::string_view prefix) { in StripPrefix()
82 ABSL_MUST_USE_RESULT inline absl::string_view StripSuffix( in StripSuffix()
83 absl::string_view str, absl::string_view suffix) { in StripSuffix()
Dstr_replace.h69 absl::string_view s,
70 std::initializer_list<std::pair<absl::string_view, absl::string_view>>
97 std::string StrReplaceAll(absl::string_view s,
114 std::initializer_list<std::pair<absl::string_view, absl::string_view>>
137 absl::string_view old;
138 absl::string_view replacement;
141 ViableSubstitution(absl::string_view old_str, in ViableSubstitution()
142 absl::string_view replacement_str, size_t offset_val) in ViableSubstitution()
159 absl::string_view s, const StrToStrMapping& replacements) { in FindSubstitutions()
165 absl::string_view old(get<0>(rep)); in FindSubstitutions()
[all …]
Dcord.h100 Cord MakeCordFromExternal(absl::string_view, Releaser&&);
153 explicit Cord(absl::string_view src);
154 Cord& operator=(absl::string_view src);
211 friend Cord MakeCordFromExternal(absl::string_view data, Releaser&& releaser);
225 void Append(absl::string_view src);
234 void Prepend(absl::string_view src);
290 int Compare(absl::string_view rhs) const;
297 bool StartsWith(absl::string_view rhs) const;
302 bool EndsWith(absl::string_view rhs) const;
355 using value_type = absl::string_view;
[all …]
/third_party/skia/tests/
DSkStringViewTest.cpp13 skstd::string_view empty; in DEF_TEST()
18 skstd::string_view helloWorld(str); in DEF_TEST()
22 skstd::string_view hello(str, 5); in DEF_TEST()
26 skstd::string_view copy(hello); in DEF_TEST()
36 skstd::string_view empty(""); in DEF_TEST()
45 skstd::string_view xyz("xyz"); in DEF_TEST()
75 skstd::string_view str("abc"); in DEF_TEST()
76 skstd::string_view::iterator iter = str.begin(); in DEF_TEST()
86 skstd::string_view empty; in DEF_TEST()
91 skstd::string_view empty; in DEF_TEST()
[all …]
/third_party/skia/include/core/
DSkStringView.h17 class string_view {
28 constexpr string_view() in string_view() function
32 constexpr string_view(const string_view&) = default;
34 constexpr string_view(const_pointer data, size_type length) in string_view() function
38 string_view(const_pointer data) in string_view() function
39 : string_view(data, strlen(data)) {} in string_view()
41 string_view(const std::string& str) in string_view() function
42 : string_view(str.data(), str.length()) {} in string_view()
44 constexpr string_view& operator=(const string_view&) = default;
82 constexpr bool starts_with(string_view s) const { in starts_with()
[all …]
/third_party/gn/src/base/
Dvalues.h122 explicit Value(std::string_view in_string);
172 Value* FindKey(std::string_view key);
173 const Value* FindKey(std::string_view key) const;
184 Value* FindKeyOfType(std::string_view key, Type type);
185 const Value* FindKeyOfType(std::string_view key, Type type) const;
194 Value* SetKey(std::string_view key, Value value);
208 bool RemoveKey(std::string_view key);
228 Value* FindPath(std::initializer_list<std::string_view> path);
229 Value* FindPath(span<const std::string_view> path);
230 const Value* FindPath(std::initializer_list<std::string_view> path) const;
[all …]
/third_party/json/tests/src/
Dunit-element_access2.cpp50 CHECK(j.at(std::string_view("integer")) == Json(1));
51 CHECK(j.at(std::string_view("unsigned")) == Json(1u));
52 CHECK(j.at(std::string_view("boolean")) == Json(true));
53 CHECK(j.at(std::string_view("null")) == Json(nullptr));
54 CHECK(j.at(std::string_view("string")) == Json("hello world"));
55 CHECK(j.at(std::string_view("floating")) == Json(42.23));
56 CHECK(j.at(std::string_view("object")) == Json::object());
57 CHECK(j.at(std::string_view("array")) == Json({1, 2, 3}));
59 CHECK(j_const.at(std::string_view("integer")) == Json(1));
60 CHECK(j_const.at(std::string_view("unsigned")) == Json(1u));
[all …]
/third_party/skia/src/core/
DSkStringView.cpp13 bool operator==(string_view left, string_view right) { in operator ==()
17 return !string_view::traits_type::compare(left.data(), right.data(), left.length()); in operator ==()
20 bool operator!=(string_view left, string_view right) { in operator !=()
24 bool operator<(string_view left, string_view right) { in operator <()
25 int result = string_view::traits_type::compare(left.data(), right.data(), in operator <()
33 bool operator<=(string_view left, string_view right) { in operator <=()
37 bool operator>(string_view left, string_view right) { in operator >()
41 bool operator>=(string_view left, string_view right) { in operator >=()
/third_party/gn/src/base/strings/
Dstring_util.h74 std::string ToLowerASCII(std::string_view str);
78 std::string ToUpperASCII(std::string_view str);
104 int CompareCaseInsensitiveASCII(std::string_view a, std::string_view b);
110 bool EqualsCaseInsensitiveASCII(std::string_view a, std::string_view b);
130 std::string_view remove_chars,
143 std::string_view replace_chars,
164 std::string_view trim_chars,
172 std::string_view TrimString(std::string_view input,
173 std::string_view trim_chars,
197 std::string_view TrimWhitespaceASCII(std::string_view input,
[all …]
Dstring_split.cc25 std::string_view WhitespaceForType<char>() { in WhitespaceForType()
35 size_t FindFirstOf(std::string_view piece, char c, size_t pos) { in FindFirstOf()
41 size_t FindFirstOf(std::string_view piece, in FindFirstOf()
42 std::string_view one_of, in FindFirstOf()
95 bool AppendStringKeyValue(std::string_view input, in AppendStringKeyValue()
111 std::string_view remains = in AppendStringKeyValue()
114 if (begin_value_pos == std::string_view::npos) { in AppendStringKeyValue()
150 std::vector<std::string> SplitString(std::string_view input, in SplitString()
151 std::string_view separators, in SplitString()
158 return SplitStringT<char, std::string, std::string_view>( in SplitString()
[all …]
Dstring_split.h43 std::vector<std::string> SplitString(std::string_view input,
44 std::string_view separators,
64 std::vector<std::string_view> SplitStringPiece(std::string_view input,
65 std::string_view separators,
80 bool SplitStringIntoKeyValuePairs(std::string_view input,
92 std::vector<std::string> SplitStringUsingSubstr(std::string_view input,
93 std::string_view delimiter,
114 std::vector<std::string_view> SplitStringPieceUsingSubstr(
115 std::string_view input,
116 std::string_view delimiter,
/third_party/gn/src/gn/
Dsource_dir.h34 SourceDir(std::string_view s);
51 std::string_view source_root = std::string_view(),
59 std::string_view input_value,
61 std::string_view source_root = std::string_view()) const;
67 std::string_view source_root = std::string_view()) const;
72 std::string_view input_value,
74 std::string_view source_root = std::string_view()) const;
81 std::string_view source_root = std::string_view()) const;
108 std::string_view SourceAbsoluteWithOneSlash() const { in SourceAbsoluteWithOneSlash()
111 return std::string_view(&v[1], v.size() - 1); in SourceAbsoluteWithOneSlash()
[all …]
Dfilesystem_utils.h23 base::FilePath UTF8ToFilePath(std::string_view sp);
34 std::string_view FindExtension(const std::string* path);
46 std::string_view FindFilename(const std::string* path);
49 std::string_view FindFilenameNoExtension(const std::string* path);
63 bool EndsWithSlash(std::string_view s);
70 std::string_view FindDir(const std::string* path);
74 std::string_view FindLastDirComponent(const SourceDir& dir);
99 bool IsPathAbsolute(std::string_view path);
104 bool IsPathSourceAbsolute(std::string_view path);
115 bool MakeAbsolutePathRelativeIfPossible(std::string_view source_root,
[all …]
Dc_include_iterator.cc25 std::string_view TrimLeadingWhitespace(std::string_view str) { in TrimLeadingWhitespace()
44 bool ShouldCountTowardNonIncludeLines(std::string_view line) { in ShouldCountTowardNonIncludeLines()
63 IncludeType ExtractInclude(std::string_view line, in ExtractInclude()
64 std::string_view* path, in ExtractInclude()
71 std::string_view trimmed = TrimLeadingWhitespace(line); in ExtractInclude()
80 std::string_view contents; in ExtractInclude()
81 if (base::StartsWith(trimmed, std::string_view(kInclude, kIncludeLen), in ExtractInclude()
84 else if (base::StartsWith(trimmed, std::string_view(kImport, kImportLen), in ExtractInclude()
105 if (terminator_index == std::string_view::npos) in ExtractInclude()
115 bool HasNoCheckAnnotation(std::string_view line) { in HasNoCheckAnnotation()
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/flags/
Dmarshalling.h176 bool AbslParseFlag(absl::string_view, bool*, std::string*);
177 bool AbslParseFlag(absl::string_view, short*, std::string*); // NOLINT
178 bool AbslParseFlag(absl::string_view, unsigned short*, std::string*); // NOLINT
179 bool AbslParseFlag(absl::string_view, int*, std::string*); // NOLINT
180 bool AbslParseFlag(absl::string_view, unsigned int*, std::string*); // NOLINT
181 bool AbslParseFlag(absl::string_view, long*, std::string*); // NOLINT
182 bool AbslParseFlag(absl::string_view, unsigned long*, std::string*); // NOLINT
183 bool AbslParseFlag(absl::string_view, long long*, std::string*); // NOLINT
184 bool AbslParseFlag(absl::string_view, unsigned long long*, // NOLINT
186 bool AbslParseFlag(absl::string_view, float*, std::string*);
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/internal/str_format/
Dchecker.h70 constexpr char GetChar(string_view str, size_t index) { in GetChar()
74 constexpr string_view ConsumeFront(string_view str, size_t len = 1) {
75 return len <= str.size() ? string_view(str.data() + len, str.size() - len)
76 : string_view();
79 constexpr string_view ConsumeAnyOf(string_view format, const char* chars) { in ConsumeAnyOf()
90 string_view format;
101 constexpr Integer ParseDigits(string_view format, int value = 0) {
110 constexpr Integer ParsePositional(string_view format) { in ParsePositional()
117 constexpr ConvParser SetFormat(string_view format) const { in SetFormat()
202 constexpr ConvParser(string_view format, ConvList args, bool error, in ConvParser()
[all …]
/third_party/skia/third_party/externals/abseil-cpp/absl/time/
Dcivil_time.cc37 std::string FormatYearAnd(string_view fmt, CivilSecond cs) { in FormatYearAnd()
45 bool ParseYearAnd(string_view fmt, string_view s, CivilT* c) { in ParseYearAnd()
72 bool ParseAs(string_view s, CivilT2* c) { in ParseAs()
82 bool ParseLenient(string_view s, CivilT* c) { in ParseLenient()
111 bool ParseCivilTime(string_view s, CivilSecond* c) { in ParseCivilTime()
114 bool ParseCivilTime(string_view s, CivilMinute* c) { in ParseCivilTime()
117 bool ParseCivilTime(string_view s, CivilHour* c) { in ParseCivilTime()
120 bool ParseCivilTime(string_view s, CivilDay* c) { in ParseCivilTime()
123 bool ParseCivilTime(string_view s, CivilMonth* c) { in ParseCivilTime()
126 bool ParseCivilTime(string_view s, CivilYear* c) { in ParseCivilTime()
[all …]

12345678910>>...19