/third_party/ffmpeg/libavutil/tests/ |
D | avstring.c | 58 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/python/Objects/stringlib/ |
D | fastsearch.h | 64 unsigned char needle = ch & 0xff; in STRINGLIB() 68 if (needle != 0) { in STRINGLIB() 70 void *candidate = memchr(p, needle, in STRINGLIB() 124 unsigned char needle = ch & 0xff; in STRINGLIB() 128 if (needle != 0) { in STRINGLIB() 130 void *candidate = memrchr(s, needle, in STRINGLIB() 179 STRINGLIB(_lex_search)(const STRINGLIB_CHAR *needle, Py_ssize_t len_needle, in STRINGLIB() 193 STRINGLIB_CHAR a = needle[candidate + k]; in STRINGLIB() 194 STRINGLIB_CHAR b = needle[max_suffix + k]; in STRINGLIB() 231 STRINGLIB(_factorize)(const STRINGLIB_CHAR *needle, in STRINGLIB() [all …]
|
D | stringlib_find_two_way_notes.txt | 2 algorithm, in which a smaller string (the "pattern" or "needle") 4 determining whether the needle is a substring of the haystack, and if 19 The algorithm runs in O(len(needle) + len(haystack)) time and with 22 needle and haystack lengths meet certain thresholds. 27 * "Very carefully" cut the needle in two. 33 * If the needle is periodic, don't re-do comparisons; maintain 39 We first scan the right part of the needle to check if it matches the 55 Why are we allowed to do this? Because we cut the needle very 85 around the end of the needle: if the left half is shorter than the 100 outside the limits of the needle, so there's no way for them to [all …]
|
/third_party/skia/third_party/externals/angle2/src/compiler/translator/TranslatorMetalDirect/ |
D | DebugSink.h | 17 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/ |
D | controlFlowPropertyDeclarations.js | 51 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)
|
D | controlFlowPropertyDeclarations.types | 113 * @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 …]
|
D | controlFlowPropertyDeclarations.symbols | 86 * @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/ |
D | search_test1.cpp | 35 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 …]
|
D | search_test3.cpp | 34 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()
|
D | search_test2.cpp | 33 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()
|
D | search_test4.cpp | 30 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/abseil-cpp/absl/strings/internal/ |
D | memutil.h | 90 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/skia/third_party/externals/abseil-cpp/absl/strings/internal/ |
D | memutil.h | 90 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/ |
D | controlFlowPropertyDeclarations.ts | 50 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/ |
D | SkStringView.h | 104 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/ |
D | sdl_string.lua | 56 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/ |
D | match.h | 47 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/ |
D | wcsstr-false-negative.c | 9 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()
|
/third_party/curl/lib/vtls/ |
D | vtls.c | 131 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/curl/lib/ |
D | url.c | 919 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() 941 if(Curl_timestrcmp(data->user, needle->user) || in socks_proxy_info_matches() 942 Curl_timestrcmp(data->passwd, needle->passwd)) in socks_proxy_info_matches() 1097 struct connectdata *needle, in ConnectionExists() argument 1105 bool canmultiplex = IsMultiplexingPossible(data, needle); in ConnectionExists() [all …]
|
/third_party/icu/icu4c/source/common/ |
D | stringpiece.cpp | 54 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/skia/third_party/externals/icu/source/common/ |
D | stringpiece.cpp | 54 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/ |
D | stringpiece.cpp | 54 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/ltp/scripts/coccinelle/ |
D | kselftest-cgroup-to-ltp.cocci | 28 expression cg, fname, needle; 31 - cg_read_strstr(cg, fname, needle) 32 + !SAFE_CGROUP_OCCURSIN(cg, fname, needle)
|
/third_party/ninja/src/ |
D | clparser.cc | 34 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()
|