Home
last modified time | relevance | path

Searched refs:rfind (Results 1 - 25 of 165) sorted by relevance

1234567

/third_party/protobuf/src/google/protobuf/stubs/
H A Dstringpiece_unittest.cc371 EXPECT_EQ(a.rfind(b), 0); in TEST()
372 EXPECT_EQ(a.rfind(b, 1), 0); in TEST()
373 EXPECT_EQ(a.rfind(c), 23); in TEST()
374 EXPECT_EQ(a.rfind(c, 22), StringPiece::npos); in TEST()
375 EXPECT_EQ(a.rfind(c, 1), StringPiece::npos); in TEST()
376 EXPECT_EQ(a.rfind(c, 0), StringPiece::npos); in TEST()
377 EXPECT_EQ(b.rfind(c), StringPiece::npos); in TEST()
378 EXPECT_EQ(b.rfind(c, 0), StringPiece::npos); in TEST()
379 EXPECT_EQ(a.rfind(d), a.as_string().rfind(strin in TEST()
[all...]
H A Dstringpiece.h368 stringpiece_ssize_type rfind(StringPiece s, size_type pos = npos) const;
369 stringpiece_ssize_type rfind(char c, size_type pos = npos) const;
381 return rfind(c, pos); in find_last_of()
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/
H A Dstring_view_test.cc470 EXPECT_EQ(a.rfind(b), 0); in TEST()
471 EXPECT_EQ(a.rfind(b, 1), 0); in TEST()
472 EXPECT_EQ(a.rfind(c), 23); in TEST()
473 EXPECT_EQ(a.rfind(c, 22), absl::string_view::npos); in TEST()
474 EXPECT_EQ(a.rfind(c, 1), absl::string_view::npos); in TEST()
475 EXPECT_EQ(a.rfind(c, 0), absl::string_view::npos); in TEST()
476 EXPECT_EQ(b.rfind(c), absl::string_view::npos); in TEST()
477 EXPECT_EQ(b.rfind(c, 0), absl::string_view::npos); in TEST()
478 EXPECT_EQ(a.rfind(d), std::string(a).rfind(st in TEST()
[all...]
H A Dstring_view.h475 // string_view::rfind()
480 size_type rfind(string_view s, size_type pos = npos) const noexcept;
482 // Overload of `string_view::rfind()` for finding the last given character `c`
484 size_type rfind(char c, size_type pos = npos) const noexcept;
486 // Overload of `string_view::rfind()` for finding a substring of a different
488 size_type rfind(const char* s, size_type pos, size_type count) const {
489 return rfind(string_view(s, count), pos);
492 // Overload of `string_view::rfind()` for finding a different C-style string
494 size_type rfind(const char* s, size_type pos = npos) const {
495 return rfind(string_vie
[all...]
/third_party/rust/crates/memchr/src/memmem/
H A Dmod.rs290 /// assert_eq!(Some(0), memmem::rfind(haystack, b"foo"));
291 /// assert_eq!(Some(4), memmem::rfind(haystack, b"bar"));
292 /// assert_eq!(Some(8), memmem::rfind(haystack, b"ba"));
293 /// assert_eq!(None, memmem::rfind(haystack, b"quux"));
296 pub fn rfind(haystack: &[u8], needle: &[u8]) -> Option<usize> { in rfind() functions
298 rabinkarp::rfind(haystack, needle) in rfind()
300 FinderRev::new(needle).rfind(haystack) in rfind()
420 let result = self.finder.rfind(&self.haystack[..pos]); in next()
569 /// using [`rfind`] is good enough, but `FinderRev` is useful when you can
610 /// assert_eq!(Some(0), FinderRev::new("foo").rfind(haystac
614 pub fn rfind<B: AsRef<[u8]>>(&self, haystack: B) -> Option<usize> { rfind() functions
1109 fn rfind(&self, haystack: &[u8]) -> Option<usize> { rfind() functions
[all...]
H A Drabinkarp.rs71 pub(crate) fn rfind(haystack: &[u8], needle: &[u8]) -> Option<usize> {
227 define_memmem_simple_tests!(super::find, super::rfind);
232 define_memmem_quickcheck_tests!(super::find, super::rfind);
H A Dtwoway.rs275 pub(crate) fn rfind(
296 /// Like rfind, but handles the degenerate substring test cases. This is
306 self.rfind(haystack, needle) in rfind_general()
873 let rfind = super::simpletests::twoway_rfind; in regression_rev_small_period()
876 assert_eq!(Some(0), rfind(haystack.as_bytes(), needle.as_bytes())); in regression_rev_small_period()
/third_party/python/Lib/
H A Dgenericpath.py128 sepIndex = p.rfind(sep)
130 altsepIndex = p.rfind(altsep)
133 dotIndex = p.rfind(extsep)
/third_party/rust/crates/memchr/bench/src/memmem/
H A Dimp.rs68 memmem::rfind(haystack.as_bytes(), needle.as_bytes()).is_some()
75 move |h| finder.rfind(h.as_bytes()).is_some()
172 finder(needle.as_bytes()).rfind(haystack.as_bytes()).is_some() in finder()
179 move |h| finder.rfind(h.as_bytes()).is_some()
189 |h, n| finder(n).rfind(h),
264 bstr::ByteSlice::rfind(haystack.as_bytes(), needle.as_bytes())
272 move |h| finder.rfind(h.as_bytes()).is_some()
297 move |h, _| self.0.rfind(h),
835 mut rfind: impl FnMut(&[u8], &[u8]) -> Option<usize> + 'a, in iter_from_rfind()
843 match rfind(
[all...]
/third_party/vk-gl-cts/external/amber/src/src/vkscript/
H A Dsection_parser.cc55 size_t pos = data.rfind(" spirv hex"); in NameToNodeType()
60 pos = data.rfind(" spirv"); in NameToNodeType()
69 pos = data.rfind(" passthrough"); in NameToNodeType()
191 size_t name_end = line.rfind("]"); in SplitSections()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/include/llvm/ADT/
H A DSmallString.h163 size_t rfind(char C, size_t From = StringRef::npos) const { in rfind() function in llvm::SmallString
164 return str().rfind(C, From); in rfind()
171 size_t rfind(StringRef Str) const { in rfind() function in llvm::SmallString
172 return str().rfind(Str); in rfind()
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/ADT/
H A DSmallString.h162 size_t rfind(char C, size_t From = StringRef::npos) const { in rfind() function in llvm::SmallString
163 return str().rfind(C, From); in rfind()
170 size_t rfind(StringRef Str) const { in rfind() function in llvm::SmallString
171 return str().rfind(Str); in rfind()
/third_party/node/deps/icu-small/source/tools/escapesrc/
H A Descapesrc.cpp333 while((pos>0) && (pos = linestr.rfind("u\"", pos)) != std::string::npos) { in fixLine()
342 while((pos>0) && (pos = linestr.rfind("u'", pos)) != std::string::npos) { in fixLine()
351 while((pos>0) && (pos = linestr.rfind("u8\"", pos)) != std::string::npos) { in fixLine()
/third_party/icu/icu4c/source/tools/escapesrc/
H A Descapesrc.cpp333 while((pos>0) && (pos = linestr.rfind("u\"", pos)) != std::string::npos) { in fixLine()
342 while((pos>0) && (pos = linestr.rfind("u'", pos)) != std::string::npos) { in fixLine()
351 while((pos>0) && (pos = linestr.rfind("u8\"", pos)) != std::string::npos) { in fixLine()
/third_party/libphonenumber/cpp/src/phonenumbers/base/strings/
H A Dstring_piece.h140 size_type rfind(const StringPiece& s, size_type pos = npos) const;
141 size_type rfind(char c, size_type pos = npos) const;
151 return rfind(c, pos); in find_last_of()
/third_party/skia/third_party/externals/icu/source/tools/escapesrc/
H A Descapesrc.cpp333 while((pos>0) && (pos = linestr.rfind("u\"", pos)) != std::string::npos) { in fixLine()
342 while((pos>0) && (pos = linestr.rfind("u'", pos)) != std::string::npos) { in fixLine()
351 while((pos>0) && (pos = linestr.rfind("u8\"", pos)) != std::string::npos) { in fixLine()
/third_party/icu/icu4c/source/python/icutools/databuilder/
H A Dfiltration.py55 start = file.filename.rfind("/")
56 limit = file.filename.rfind(".")
61 limit = file.filename.rfind("/")
230 i = locale.rfind("_")
340 file.filename[file.filename.rfind("/")+1:]
/third_party/skia/third_party/externals/icu/source/python/icutools/databuilder/
H A Dfiltration.py55 start = file.filename.rfind("/")
56 limit = file.filename.rfind(".")
61 limit = file.filename.rfind("/")
230 i = locale.rfind("_")
340 file.filename[file.filename.rfind("/")+1:]
/third_party/python/Objects/stringlib/
H A Dfind.h27 STRINGLIB(rfind)(const STRINGLIB_CHAR* str, Py_ssize_t str_len, in rfind() function
58 return STRINGLIB(rfind)(str + start, end - start, sub, sub_len, start); in rfind_slice()
75 This function is a helper for the "find" family (find, rfind, index,
/third_party/vulkan-loader/tests/framework/
H A Dtest_util.cpp305 auto last_div = contents.rfind(path_separator); in parent_path()
310 auto last_div = contents.rfind(path_separator); in has_parent_path()
314 auto last_div = contents.rfind(path_separator); in filename()
319 auto last_div = contents.rfind(path_separator); in extension()
320 auto ext_div = contents.rfind('.'); in extension()
329 auto last_div = contents.rfind(path_separator); in stem()
330 auto ext_div = contents.rfind('.'); in stem()
/third_party/rust/crates/os_str_bytes/src/
H A Draw_str.rs25 use memchr::memmem::rfind;
46 fn rfind(string: &[u8], pat: &[u8]) -> Option<usize> { in rfind() functions
48 .rfind(|&x| string[..x].ends_with(pat)) in rfind()
421 /// Equivalent to [`str::rfind`].
429 /// assert_eq!(Some(2), raw.rfind("o"));
430 /// assert_eq!(None, raw.rfind("of"));
434 pub fn rfind<P>(&self, pat: P) -> Option<usize> in rfind() functions
441 rfind(&self.0, pat) in rfind()
465 self.split_once_raw_with(pat, rfind)
/third_party/glslang/gtests/
H A DTestFixture.cpp176 const size_t pos = name.rfind('.'); in GetSuffix()
177 return (pos == std::string::npos) ? "" : name.substr(name.rfind('.') + 1); in GetSuffix()
/third_party/node/deps/googletest/include/gtest/internal/
H A Dgtest-type-util.h110 // Only strip the leading "struct " and "class ", so uses rfind == 0 to in GetTypeName()
112 if (s.rfind("struct ", 0) == 0) { in GetTypeName()
114 } else if (s.rfind("class ", 0) == 0) { in GetTypeName()
/third_party/python/Tools/stringbench/
H A Dstringbench.py222 #### Same tests for 'rfind'
224 @bench('("A"*1000).rfind("A")', "early match, single character", 1000)
228 s1_rfind = s1.rfind
232 @bench('("A"*1000).rfind("B")', "no match, single character", 1000)
236 s1_rfind = s1.rfind
241 @bench('("AB"*1000).rfind("AB")', "early match, two characters", 1000)
245 s1_rfind = s1.rfind
249 @bench('("AB"*1000).rfind("BC")', "no match, two characters", 1000)
253 s1_rfind = s1.rfind
257 @bench('("AB"*1000).rfind("C
[all...]
/third_party/python/Lib/idlelib/
H A Dpyparse.py156 i = code.rfind(":\n", 0, limit)
159 i = code.rfind('\n', 0, i) + 1 # start of colon line (-1+1=0)
370 p = code.rfind('\n', 0, p-1) + 1
468 origi = i = code.rfind('\n', 0, j) + 1

Completed in 18 milliseconds

1234567