Home
last modified time | relevance | path

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

123456

/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.c68 static inline char* HF_strstr(const char* haystack, const char* needle, uintptr_t addr) { in HF_strstr() argument
69 size_t needle_len = __builtin_strlen(needle); in HF_strstr()
75 for (; (h = __builtin_strchr(h, needle[0])) != NULL; h++) { in HF_strstr()
76 if (HF_strncmp(h, needle, needle_len, addr) == 0) { in HF_strstr()
83 static inline char* HF_strcasestr(const char* haystack, const char* needle, uintptr_t addr) { in HF_strcasestr() argument
84 size_t needle_len = __builtin_strlen(needle); in HF_strcasestr()
86 if (HF_strncasecmp(&haystack[i], needle, needle_len, addr) == 0) { in HF_strcasestr()
111 static inline void* HF_memmem(const void* haystack, size_t haystacklen, const void* needle, in HF_memmem() argument
122 if (HF_memcmp(&h[i], needle, needlelen, addr) == 0) { in HF_memmem()
157 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/perfetto/src/base/
Dstring_utils.cc38 bool Contains(const std::string& haystack, const std::string& needle) { in Contains() argument
39 return haystack.find(needle) != std::string::npos; in Contains()
42 size_t Find(const StringView& needle, const StringView& haystack) { in Find() argument
43 if (needle.size() == 0) in Find()
45 if (needle.size() > haystack.size()) in Find()
47 for (size_t i = 0; i < haystack.size() - (needle.size() - 1); ++i) { in Find()
48 if (strncmp(haystack.data() + i, needle.data(), needle.size()) == 0) in Find()
/external/ImageMagick/MagickCore/
Dstring-private.h50 const char *needle) in StringLocateSubstring() argument
53 return(strcasestr(haystack,needle)); in StringLocateSubstring()
63 if (!haystack || !needle) in StringLocateSubstring()
65 length_needle=strlen(needle); in StringLocateSubstring()
75 unsigned char c2 = needle[j]; in StringLocateSubstring()
/external/guava/guava-tests/benchmark/com/google/common/base/
DCharMatcherBenchmark.java173 int needle = random.nextInt(sum); in nextCodePoint() local
182 if (needle == cv) { in nextCodePoint()
184 } else if ((lv <= needle) && (needle < cv)) { in nextCodePoint()
186 } else if (needle == rv) { in nextCodePoint()
188 } else if (needle < cv) { in nextCodePoint()
193 } else if (needle == cv) { in nextCodePoint()
/external/guava/android/guava-tests/benchmark/com/google/common/base/
DCharMatcherBenchmark.java173 int needle = random.nextInt(sum); in nextCodePoint() local
182 if (needle == cv) { in nextCodePoint()
184 } else if ((lv <= needle) && (needle < cv)) { in nextCodePoint()
186 } else if (needle == rv) { in nextCodePoint()
188 } else if (needle < cv) { in nextCodePoint()
193 } else if (needle == cv) { in nextCodePoint()
/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/curl/lib/
Durl.c875 const struct proxy_info* needle) in proxy_info_matches() argument
877 if((data->proxytype == needle->proxytype) && in proxy_info_matches()
878 (data->port == needle->port) && in proxy_info_matches()
879 Curl_safe_strcasecompare(data->host.name, needle->host.name)) in proxy_info_matches()
1010 struct connectdata *needle, in ConnectionExists() argument
1018 bool canmultiplex = IsMultiplexingPossible(data, needle); in ConnectionExists()
1025 (needle->handler->protocol & PROTO_FAMILY_HTTP)); in ConnectionExists()
1026 bool wantProxyNTLMhttp = (needle->bits.proxy_user_passwd && in ConnectionExists()
1029 (needle->handler->protocol & PROTO_FAMILY_HTTP))); in ConnectionExists()
1037 bundle = Curl_conncache_find_bundle(needle, data->state.conn_cache, in ConnectionExists()
[all …]
/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/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/igt-gpu-tools/scripts/
Dlist-workarounds13 def find_nth(haystack, needle, n): argument
14 start = haystack.find(needle)
16 start = haystack.find(needle, start + len(needle))
/external/mesa3d/src/util/
Du_drm.h34 util_array_contains_u64(uint64_t needle, const uint64_t *haystack, unsigned count) in util_array_contains_u64() argument
39 if (haystack[i] == needle) in util_array_contains_u64()
/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/skia/tests/
DAnnotationTest.cpp28 static bool ContainsString(const char* data, size_t dataSize, const char* needle) { in ContainsString() argument
29 size_t nSize = strlen(needle); in ContainsString()
31 if (strncmp(&data[i], needle, nSize) == 0) { in ContainsString()
/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/linux-kselftest/tools/testing/selftests/cgroup/
Dcgroup_util.h30 const char *needle);
52 extern int proc_read_strstr(int pid, bool thread, const char *item, const char *needle);
Dcgroup_util.c126 int cg_read_strstr(const char *cgroup, const char *control, const char *needle) in cg_read_strstr() argument
133 return strstr(buf, needle) ? 0 : -1; in cg_read_strstr()
444 int proc_read_strstr(int pid, bool thread, const char *item, const char *needle) in proc_read_strstr() argument
451 return strstr(buf, needle) ? 0 : -1; in proc_read_strstr()
/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/angle/src/libANGLE/
DObserver.h22 bool IsInContainer(const HaystackT &haystack, const NeedleT &needle) in IsInContainer() argument
24 return std::find(haystack.begin(), haystack.end(), needle) != haystack.end(); in IsInContainer()

123456