Home
last modified time | relevance | path

Searched refs:needle (Results 1 – 25 of 159) sorted by relevance

1234567

/third_party/ffmpeg/libavutil/tests/
Davstring.c58 const char * const needle[] = {"learned.", "unlearned.", "Unlearned"}; in main() local
86 #define TEST_STRNSTR(haystack, needle, hay_length, expected) \ in main() argument
87 ptr = av_strnstr(haystack, needle, hay_length); \ in main()
91 TEST_STRNSTR(haystack, needle [0], strlen(haystack), haystack+44); in main()
92 TEST_STRNSTR(haystack, needle [1], strlen(haystack), haystack+42); in main()
93 TEST_STRNSTR(haystack, needle [2], strlen(haystack), NULL ); in main()
97 #define TEST_STRIREPLACE(haystack, needle, expected) \ in main() argument
98 ptr = av_strireplace(haystack, needle, "instead"); \ in main()
107 TEST_STRIREPLACE(haystack, needle [0], "Education consists mainly in what we have uninstead"); in main()
108 TEST_STRIREPLACE(haystack, needle [1], "Education consists mainly in what we have instead"); in main()
[all …]
/third_party/skia/third_party/externals/angle2/src/compiler/translator/TranslatorMetalDirect/
DDebugSink.h17 StringObserver(const std::string &needle) : needle(needle) { ASSERT(!needle.empty()); } in StringObserver() argument
21 if (needle[currPos] == c) in observe()
24 if (currPos == needle.size()) in observe()
37 const std::string &getNeedle() const { return needle; } in getNeedle()
42 std::string needle;
81 void watch(std::string const &needle) in watch() argument
83 if (!needle.empty()) in watch()
85 mObservers.emplace_back(needle); in watch()
138 const std::string &needle = observer.getNeedle(); in onWrite() local
139 (void)needle; in onWrite()
/third_party/typescript/tests/baselines/reference/
DcontrolFlowPropertyDeclarations.js51 function endsWith(haystack, needle) { argument
52 return haystack.slice(-needle.length) === needle;
63 function trimEnd(haystack, needle) { argument
64 return endsWith(haystack, needle)
65 ? haystack.slice(0, -needle.length)
199 function endsWith(haystack, needle) {
200 return haystack.slice(-needle.length) === needle;
210 function trimEnd(haystack, needle) {
211 return endsWith(haystack, needle)
212 ? haystack.slice(0, -needle.length)
DcontrolFlowPropertyDeclarations.types113 * @param {string} needle String to search for
116 function endsWith(haystack, needle) {
117 >endsWith : (haystack: any, needle: any) => boolean
119 >needle : any
121 return haystack.slice(-needle.length) === needle;
122 >haystack.slice(-needle.length) === needle : boolean
123 >haystack.slice(-needle.length) : any
127 >-needle.length : number
128 >needle.length : any
129 >needle : any
[all …]
DcontrolFlowPropertyDeclarations.symbols86 * @param {string} needle String to search for
89 function endsWith(haystack, needle) {
92 >needle : Symbol(needle, Decl(controlFlowPropertyDeclarations.ts, 49, 27))
94 return haystack.slice(-needle.length) === needle;
96 >needle : Symbol(needle, Decl(controlFlowPropertyDeclarations.ts, 49, 27))
97 >needle : Symbol(needle, Decl(controlFlowPropertyDeclarations.ts, 49, 27))
105 * @param {string} needle String to search for
108 function trimEnd(haystack, needle) {
111 >needle : Symbol(needle, Decl(controlFlowPropertyDeclarations.ts, 61, 26))
113 return endsWith(haystack, needle)
[all …]
/third_party/boost/libs/algorithm/test/
Dsearch_test1.cpp35 void check_one_iter ( const Container &haystack, const std::string &needle, int expected ) { in check_one_iter() argument
42 pattern_type nBeg = needle.begin (); in check_one_iter()
43 pattern_type nEnd = needle.end (); in check_one_iter()
58 …std::cout << "(Iterators) Pattern is " << needle.length () << ", haysstack is " << haystack.length… in check_one_iter()
83 std::cout << "Searching for: " << needle << std::endl; in check_one_iter()
100 void check_one_pointer ( const Container &haystack, const std::string &needle, int expected ) { in check_one_pointer() argument
106 ptr_type nBeg = needle.size () == 0 ? NULL : &*needle.begin (); in check_one_pointer()
107 ptr_type nEnd = nBeg + needle.size (); in check_one_pointer()
115 …std::cout << "(Pointers) Pattern is " << needle.length () << ", haysstack is " << haystack.length … in check_one_pointer()
135 std::cout << "Searching for: " << needle << std::endl; in check_one_pointer()
[all …]
Dsearch_test2.cpp33 needle.begin (), needle.end ()); \
49 s_o ( needle.begin (), needle.end ()); \
88 void check_one ( const vec &haystack, const vec &needle, int expected ) { in check_one() argument
102 … exp_start = std::search ( haystack.begin (), haystack.end (), needle.begin (), needle.end ()); in check_one()
109 exp = std::make_pair(exp_start, exp_start + needle.size()); in check_one()
111 std::cout << "Pattern is " << needle.size () << " entries long" << std::endl; in check_one()
117 …iterator s_res = std::search ( haystack.begin (), haystack.end (), needle.begin (), needle.end ()); in check_one()
Dsearch_test3.cpp34 needle.begin (), needle.end ()); \
50 s_o ( needle.begin (), needle.end ()); \
88 void check_one ( const vec &haystack, const vec &needle, int expected ) { in check_one() argument
102 … exp_start = std::search ( haystack.begin (), haystack.end (), needle.begin (), needle.end ()); in check_one()
109 exp = std::make_pair(exp_start, exp_start + needle.size()); in check_one()
111 std::cout << "Pattern is " << needle.size () << " entries long" << std::endl; in check_one()
117 …iterator s_res = std::search ( haystack.begin (), haystack.end (), needle.begin (), needle.end ()); in check_one()
Dsearch_test4.cpp30 res = boost::algorithm::call ( haystack, needle ); \
42 boost::algorithm::make_##obj ( needle ); \
65 void check_one ( const vec &haystack, const vec &needle, int expected ) { in check_one() argument
76 … exp_start = std::search ( haystack.begin (), haystack.end (), needle.begin (), needle.end ()); in check_one()
83 exp = std::make_pair(exp_start, exp_start + needle.size()); in check_one()
85 std::cout << "Pattern is " << needle.size () << " entries long" << std::endl; in check_one()
89 …iterator s_res = std::search ( haystack.begin (), haystack.end (), needle.begin (), needle.end ()); in check_one()
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/internal/
Dmemutil.h90 const char* needle, size_t neelen) { in int_memmatch() argument
95 const char* needlestart = needle; in int_memmatch()
103 ? *needle in int_memmatch()
104 : absl::ascii_tolower(static_cast<unsigned char>(*needle)); in int_memmatch()
106 if (++needle == needleend) { in int_memmatch()
109 } else if (needle != needlestart) { in int_memmatch()
111 haystack -= needle - needlestart; // for loop will advance one more in int_memmatch()
112 needle = needlestart; in int_memmatch()
/third_party/abseil-cpp/absl/strings/internal/
Dmemutil.h90 const char* needle, size_t neelen) { in int_memmatch() argument
95 const char* needlestart = needle; in int_memmatch()
103 ? *needle in int_memmatch()
104 : absl::ascii_tolower(static_cast<unsigned char>(*needle)); in int_memmatch()
106 if (++needle == needleend) { in int_memmatch()
109 } else if (needle != needlestart) { in int_memmatch()
111 haystack -= needle - needlestart; // for loop will advance one more in int_memmatch()
112 needle = needlestart; in int_memmatch()
/third_party/typescript/tests/cases/compiler/
DcontrolFlowPropertyDeclarations.ts50 function endsWith(haystack, needle) {
51 return haystack.slice(-needle.length) === needle;
62 function trimEnd(haystack, needle) {
63 return endsWith(haystack, needle)
64 ? haystack.slice(0, -needle.length)
/third_party/skia/include/core/
DSkStringView.h104 size_type find(string_view needle, size_type pos = 0) const {
105 if (needle.length() == 0) {
108 if (this->length() < needle.length()) {
113 const char* end = start + this->length() - needle.length() + 1;
114 while ((match = (const char*)(memchr(start, needle[0], (size_t)(end - start))))) {
115 if (!memcmp(match, needle.data(), needle.length())) {
124 bool contains(string_view needle) const { in contains() argument
125 return this->find(needle) != npos; in contains()
/third_party/flutter/skia/third_party/externals/sdl/premake/util/
Dsdl_string.lua56 local needle = string.find(str, delim)
57 while needle ~= nil do
58 table.insert(exploded, string.sub(str, 0, needle - 1))
59 str = string.sub(str, needle + 1)
60 needle = string.find(str, delim)
/third_party/skia/third_party/externals/abseil-cpp/absl/strings/
Dmatch.h47 absl::string_view needle) noexcept { in StrContains() argument
48 return haystack.find(needle, 0) != haystack.npos; in StrContains()
51 inline bool StrContains(absl::string_view haystack, char needle) noexcept { in StrContains() argument
52 return haystack.find(needle) != haystack.npos; in StrContains()
/third_party/musl/libc-test/src/regression/
Dwcsstr-false-negative.c9 wchar_t const *needle = L"play play play"; in main() local
10 wchar_t *p = wcsstr(haystack, needle); in main()
12 t_error("wcsstr(L\"%S\",L\"%S\") failed: got %p, want %p\n", haystack, needle, p, haystack+8); in main()
Dmemmem-oob-read.c12 const unsigned char needle[] = { 0,0,0,0,0,0,0,1,3 }; in main() local
13 unsigned char *p = memmem(haystack, 8, needle, 8); in main()
/third_party/curl/lib/vtls/
Dvtls.c131 struct ssl_primary_config *needle) in Curl_ssl_config_matches() argument
133 if((data->version == needle->version) && in Curl_ssl_config_matches()
134 (data->version_max == needle->version_max) && in Curl_ssl_config_matches()
135 (data->ssl_options == needle->ssl_options) && in Curl_ssl_config_matches()
136 (data->verifypeer == needle->verifypeer) && in Curl_ssl_config_matches()
137 (data->verifyhost == needle->verifyhost) && in Curl_ssl_config_matches()
138 (data->verifystatus == needle->verifystatus) && in Curl_ssl_config_matches()
139 blobcmp(data->cert_blob, needle->cert_blob) && in Curl_ssl_config_matches()
140 blobcmp(data->ca_info_blob, needle->ca_info_blob) && in Curl_ssl_config_matches()
141 blobcmp(data->issuercert_blob, needle->issuercert_blob) && in Curl_ssl_config_matches()
[all …]
/third_party/skia/third_party/externals/icu/source/common/
Dstringpiece.cpp54 int32_t StringPiece::find(StringPiece needle, int32_t offset) { in find() argument
55 if (length() == 0 && needle.length() == 0) { in find()
61 for (; j < needle.length(); i++, j++) { in find()
62 if (data()[i] != needle.data()[j]) { in find()
/third_party/node/deps/icu-small/source/common/
Dstringpiece.cpp54 int32_t StringPiece::find(StringPiece needle, int32_t offset) { in find() argument
55 if (length() == 0 && needle.length() == 0) { in find()
61 for (; j < needle.length(); i++, j++) { in find()
62 if (data()[i] != needle.data()[j]) { in find()
/third_party/icu/icu4c/source/common/
Dstringpiece.cpp54 int32_t StringPiece::find(StringPiece needle, int32_t offset) { in find() argument
55 if (length() == 0 && needle.length() == 0) { in find()
61 for (; j < needle.length(); i++, j++) { in find()
62 if (data()[i] != needle.data()[j]) { in find()
/third_party/curl/lib/
Durl.c919 const struct proxy_info *needle) in proxy_info_matches() argument
921 if((data->proxytype == needle->proxytype) && in proxy_info_matches()
922 (data->port == needle->port) && in proxy_info_matches()
923 Curl_safe_strcasecompare(data->host.name, needle->host.name)) in proxy_info_matches()
931 const struct proxy_info *needle) in socks_proxy_info_matches() argument
933 if(!proxy_info_matches(data, needle)) in socks_proxy_info_matches()
939 if(!data->user != !needle->user) in socks_proxy_info_matches()
943 needle->user && in socks_proxy_info_matches()
944 strcmp(data->user, needle->user) != 0) in socks_proxy_info_matches()
946 if(!data->passwd != !needle->passwd) in socks_proxy_info_matches()
[all …]
/third_party/python/Objects/stringlib/
Dfastsearch.h58 unsigned char needle = ch & 0xff; in STRINGLIB()
62 if (needle != 0) { in STRINGLIB()
64 void *candidate = memchr(p, needle, in STRINGLIB()
118 unsigned char needle = ch & 0xff; in STRINGLIB()
122 if (needle != 0) { in STRINGLIB()
124 void *candidate = memrchr(s, needle, in STRINGLIB()
/third_party/ninja/src/
Dclparser.cc34 bool EndsWith(const string& input, const string& needle) { in EndsWith() argument
35 return (input.size() >= needle.size() && in EndsWith()
36 input.substr(input.size() - needle.size()) == needle); in EndsWith()
/third_party/musl/src/string/
Dwcswcs.c3 wchar_t *wcswcs(const wchar_t *haystack, const wchar_t *needle) in wcswcs() argument
5 return wcsstr(haystack, needle); in wcswcs()

1234567