Home
last modified time | relevance | path

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

12345

/external/perfetto/ui/src/base/
Dbinary_search.ts19 haystack: Numbers, needle: number, i: number, j: number): number {
22 return (needle >= haystack[i]) ? i : -1;
27 if (needle < midValue) {
28 return searchImpl(haystack, needle, i, mid);
30 return searchImpl(haystack, needle, mid, j);
35 haystack: Numbers, needle: number, i: number, j: number): Range {
38 if (haystack[i] <= needle) {
48 if (needle < midValue) {
49 return searchRangeImpl(haystack, needle, i, mid);
50 } else if (needle > midValue) {
[all …]
/external/honggfuzz/libhfuzz/
Dmemorycmp.c69 static inline char* HF_strstr(const char* haystack, const char* needle, uintptr_t addr) { in HF_strstr() argument
70 size_t needle_len = strlen(needle); in HF_strstr()
76 for (; (h = strchr(h, needle[0])) != NULL; h++) { in HF_strstr()
77 if (HF_strncmp(h, needle, needle_len, addr) == 0) { in HF_strstr()
84 static inline char* HF_strcasestr(const char* haystack, const char* needle, uintptr_t addr) { in HF_strcasestr() argument
85 size_t needle_len = strlen(needle); in HF_strcasestr()
87 if (HF_strncasecmp(&haystack[i], needle, needle_len, addr) == 0) { in HF_strcasestr()
112 static inline void* HF_memmem(const void* haystack, size_t haystacklen, const void* needle, in HF_memmem() argument
123 if (HF_memcmp(&h[i], needle, needlelen, addr) == 0) { in HF_memmem()
155 HF_WEAK_WRAP(char*, strstr, const char* haystack, const char* needle) { in HF_WEAK_WRAP() argument
[all …]
/external/iproute2/tc/
Dem_nbyte.c44 struct bstr *needle = args; in nbyte_parse_eopt() local
55 if (needle->len <= 0) in nbyte_parse_eopt()
93 nb.len = needle->len; in nbyte_parse_eopt()
99 addraw_l(n, MAX_MSG, needle->data, needle->len); in nbyte_parse_eopt()
110 __u8 *needle; in nbyte_print_eopt() local
122 needle = data + sizeof(*nb); in nbyte_print_eopt()
125 fprintf(fd, "%02x ", needle[i]); in nbyte_print_eopt()
129 fprintf(fd, "%c", isprint(needle[i]) ? needle[i] : '.'); in nbyte_print_eopt()
/external/google-breakpad/src/common/linux/
Dlinux_libc_support.cc123 const char* my_strchr(const char* haystack, char needle) { in my_strchr() argument
124 while (*haystack && *haystack != needle) in my_strchr()
126 if (*haystack == needle) in my_strchr()
131 const char* my_strrchr(const char* haystack, char needle) { in my_strrchr() argument
134 if (*haystack == needle) in my_strrchr()
141 void* my_memchr(const void* src, int needle, size_t src_len) { in my_memchr() argument
145 if (*p == needle) in my_memchr()
Dlinux_libc_support.h66 extern const char* my_strchr(const char* haystack, char needle);
68 extern const char* my_strrchr(const char* haystack, char needle);
/external/bcc/examples/usdt_sample/scripts/
Dbpf_text_shared.c11 char needle[] = "FILTER_STRING"; ///< The FILTER STRING is replaced by python code. in filter() local
12 char haystack[sizeof(needle)] = {}; in filter()
14 for (int i = 0; i < sizeof(needle) - 1; ++i) { in filter()
15 if (needle[i] != haystack[i]) { in filter()
/external/guava/guava-tests/benchmark/com/google/common/base/
DCharMatcherBenchmark.java167 int needle = random.nextInt(sum); in nextCodePoint() local
176 if (needle == cv) { in nextCodePoint()
178 } else if ((lv <= needle) && (needle < cv)) { in nextCodePoint()
180 } else if (needle == rv) { in nextCodePoint()
182 } else if (needle < cv) { in nextCodePoint()
187 } else if (needle == cv) { in nextCodePoint()
/external/curl/lib/
Durl.c955 const struct proxy_info* needle) in proxy_info_matches() argument
957 if((data->proxytype == needle->proxytype) && in proxy_info_matches()
958 (data->port == needle->port) && in proxy_info_matches()
959 Curl_safe_strcasecompare(data->host.name, needle->host.name)) in proxy_info_matches()
1071 struct connectdata *needle, in ConnectionExists() argument
1079 int canpipe = IsPipeliningPossible(data, needle); in ConnectionExists()
1085 (needle->handler->protocol & PROTO_FAMILY_HTTP)); in ConnectionExists()
1086 bool wantProxyNTLMhttp = (needle->bits.proxy_user_passwd && in ConnectionExists()
1089 (needle->handler->protocol & PROTO_FAMILY_HTTP))); in ConnectionExists()
1097 Curl_pipeline_site_blacklisted(data, needle)) in ConnectionExists()
[all …]
/external/python/cpython3/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()
/external/virglrenderer/src/gallium/auxiliary/util/
Du_string.h142 util_strstr(const char *haystack, const char *needle) in util_strstr() argument
145 size_t len = strlen(needle); in util_strstr()
147 for (; (p = util_strchr(p, *needle)) != 0; p++) { in util_strstr()
148 if (util_strncmp(p, needle, len) == 0) { in util_strstr()
/external/v8/src/inspector/
Dstring-util.h36 static size_t find(const String& s, const char* needle) { in find() argument
37 return s.find(needle); in find()
39 static size_t find(const String& s, const String& needle) { in find() argument
40 return s.find(needle); in find()
/external/mesa3d/src/util/
Du_string.h191 util_strstr(const char *haystack, const char *needle) in util_strstr() argument
194 size_t len = strlen(needle); in util_strstr()
196 for (; (p = util_strchr(p, *needle)) != 0; p++) { in util_strstr()
197 if (util_strncmp(p, needle, len) == 0) { in util_strstr()
/external/libbrillo/brillo/
Dsecure_blob_unittest.cc54 const brillo::SecureBlob& needle) { in FindBlobInBlob() argument
56 haystack.begin(), haystack.end(), needle.begin(), needle.end()); in FindBlobInBlob()
61 const brillo::SecureBlob& needle) { in FindBlobIndexInBlob() argument
63 haystack.begin(), haystack.end(), needle.begin(), needle.end()); in FindBlobIndexInBlob()
/external/perf_data_converter/src/
Dperf_data_handler.cc173 inline bool HasPrefixString(const string& haystack, const char* needle) { in HasPrefixString() argument
174 const size_t needle_len = strlen(needle); in HasPrefixString()
177 haystack.compare(0, needle_len, needle) == 0; in HasPrefixString()
180 inline bool HasSuffixString(const string& haystack, const char* needle) { in HasSuffixString() argument
181 const size_t needle_len = strlen(needle); in HasSuffixString()
184 haystack.compare(haystack_len - needle_len, needle_len, needle) == 0; in HasSuffixString()
512 size_t FindAfter(const string& haystack, const string& needle, size_t cursor) { in FindAfter() argument
513 auto next_cursor = haystack.find(needle, cursor); in FindAfter()
515 next_cursor += needle.size(); in FindAfter()
/external/curl/lib/vtls/
Dvtls.c87 struct ssl_primary_config* needle) in Curl_ssl_config_matches() argument
89 if((data->version == needle->version) && in Curl_ssl_config_matches()
90 (data->version_max == needle->version_max) && in Curl_ssl_config_matches()
91 (data->verifypeer == needle->verifypeer) && in Curl_ssl_config_matches()
92 (data->verifyhost == needle->verifyhost) && in Curl_ssl_config_matches()
93 (data->verifystatus == needle->verifystatus) && in Curl_ssl_config_matches()
94 Curl_safe_strcasecompare(data->CApath, needle->CApath) && in Curl_ssl_config_matches()
95 Curl_safe_strcasecompare(data->CAfile, needle->CAfile) && in Curl_ssl_config_matches()
96 Curl_safe_strcasecompare(data->clientcert, needle->clientcert) && in Curl_ssl_config_matches()
97 Curl_safe_strcasecompare(data->random_file, needle->random_file) && in Curl_ssl_config_matches()
[all …]
/external/mesa3d/src/glx/tests/
Dclientinfo_unittest.cpp680 const char *const needle = "GLX_ARB_create_context"; in TEST_F() local
681 const unsigned len = strlen(needle); in TEST_F()
684 char *match = strstr(haystack, needle); in TEST_F()
706 const char *const needle = "GLX_ARB_create_context_profile"; in TEST_F() local
707 const unsigned len = strlen(needle); in TEST_F()
710 char *match = strstr(haystack, needle); in TEST_F()
/external/v8/gypfiles/
Dgyp_v865 needle = 'output_dir='
67 if item.startswith(needle):
68 return item[len(needle):]
/external/skia/tests/
DAnnotationTest.cpp27 static bool ContainsString(const char* data, size_t dataSize, const char* needle) { in ContainsString() argument
28 size_t nSize = strlen(needle); in ContainsString()
30 if (strncmp(&data[i], needle, nSize) == 0) { in ContainsString()
/external/swiftshader/third_party/LLVM/utils/unittest/googletest/
Dgtest.cc1231 bool IsSubstringPred(const char* needle, const char* haystack) { in IsSubstringPred() argument
1232 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1233 return needle == haystack; in IsSubstringPred()
1235 return strstr(haystack, needle) != NULL; in IsSubstringPred()
1238 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { in IsSubstringPred() argument
1239 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1240 return needle == haystack; in IsSubstringPred()
1242 return wcsstr(haystack, needle) != NULL; in IsSubstringPred()
1247 bool IsSubstringPred(const StringType& needle, in IsSubstringPred() argument
1249 return haystack.find(needle) != StringType::npos; in IsSubstringPred()
[all …]
/external/llvm/utils/unittest/googletest/src/
Dgtest.cc1231 bool IsSubstringPred(const char* needle, const char* haystack) { in IsSubstringPred() argument
1232 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1233 return needle == haystack; in IsSubstringPred()
1235 return strstr(haystack, needle) != NULL; in IsSubstringPred()
1238 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { in IsSubstringPred() argument
1239 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1240 return needle == haystack; in IsSubstringPred()
1242 return wcsstr(haystack, needle) != NULL; in IsSubstringPred()
1247 bool IsSubstringPred(const StringType& needle, in IsSubstringPred() argument
1249 return haystack.find(needle) != StringType::npos; in IsSubstringPred()
[all …]
/external/google-breakpad/src/testing/gtest/src/
Dgtest.cc1232 bool IsSubstringPred(const char* needle, const char* haystack) { in IsSubstringPred() argument
1233 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1234 return needle == haystack; in IsSubstringPred()
1236 return strstr(haystack, needle) != NULL; in IsSubstringPred()
1239 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { in IsSubstringPred() argument
1240 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1241 return needle == haystack; in IsSubstringPred()
1243 return wcsstr(haystack, needle) != NULL; in IsSubstringPred()
1248 bool IsSubstringPred(const StringType& needle, in IsSubstringPred() argument
1250 return haystack.find(needle) != StringType::npos; in IsSubstringPred()
[all …]
/external/skqp/tests/
DAnnotationTest.cpp27 static bool ContainsString(const char* data, size_t dataSize, const char* needle) { in ContainsString() argument
28 size_t nSize = strlen(needle); in ContainsString()
30 if (strncmp(&data[i], needle, nSize) == 0) { in ContainsString()
/external/perfetto/src/base/
Dstring_utils.cc36 bool Contains(const std::string& haystack, const std::string& needle) { in Contains() argument
37 return haystack.find(needle) != std::string::npos; in Contains()
/external/libaom/libaom/third_party/googletest/src/googletest/src/
Dgtest.cc1558 bool IsSubstringPred(const char* needle, const char* haystack) { in IsSubstringPred() argument
1559 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1560 return needle == haystack; in IsSubstringPred()
1562 return strstr(haystack, needle) != NULL; in IsSubstringPred()
1565 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { in IsSubstringPred() argument
1566 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1567 return needle == haystack; in IsSubstringPred()
1569 return wcsstr(haystack, needle) != NULL; in IsSubstringPred()
1574 bool IsSubstringPred(const StringType& needle, in IsSubstringPred() argument
1576 return haystack.find(needle) != StringType::npos; in IsSubstringPred()
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/utils/unittest/googletest/src/
Dgtest.cc1557 bool IsSubstringPred(const char* needle, const char* haystack) { in IsSubstringPred() argument
1558 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1559 return needle == haystack; in IsSubstringPred()
1561 return strstr(haystack, needle) != NULL; in IsSubstringPred()
1564 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { in IsSubstringPred() argument
1565 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1566 return needle == haystack; in IsSubstringPred()
1568 return wcsstr(haystack, needle) != NULL; in IsSubstringPred()
1573 bool IsSubstringPred(const StringType& needle, in IsSubstringPred() argument
1575 return haystack.find(needle) != StringType::npos; in IsSubstringPred()
[all …]

12345