Home
last modified time | relevance | path

Searched refs:haystack (Results 1 – 25 of 75) sorted by relevance

123

/external/honggfuzz/libhfuzz/
Dmemorycmp.c99 static inline char* _strstr(const char* haystack, const char* needle, uintptr_t addr) { in _strstr() argument
101 for (size_t i = 0; haystack[i]; i++) { in _strstr()
102 if (_strncmp(&haystack[i], needle, needle_len, addr) == 0) { in _strstr()
103 return (char*)(&haystack[i]); in _strstr()
109 static inline char* _strcasestr(const char* haystack, const char* needle, uintptr_t addr) { in _strcasestr() argument
111 for (size_t i = 0; haystack[i]; i++) { in _strcasestr()
112 if (_strncasecmp(&haystack[i], needle, needle_len, addr) == 0) { in _strcasestr()
113 return (char*)(&haystack[i]); in _strcasestr()
142 static inline void* _memmem(const void* haystack, size_t haystacklen, const void* needle, in _memmem() argument
148 return (void*)haystack; in _memmem()
[all …]
Dlibhfuzz.h58 char* hfuzz_strstr(const char* haystack, const char* needle, void* addr);
59 char* hfuzz_strcasestr(const char* haystack, const char* needle, void* addr);
/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()
125 haystack++; in my_strchr()
126 if (*haystack == needle) in my_strchr()
127 return haystack; in my_strchr()
131 const char* my_strrchr(const char* haystack, char needle) { in my_strrchr() argument
133 while (*haystack) { in my_strrchr()
134 if (*haystack == needle) in my_strrchr()
135 ret = haystack; in my_strrchr()
136 haystack++; in my_strrchr()
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/libbrillo/brillo/
Dsecure_blob_unittest.cc24 static bool FindBlobInBlob(const brillo::Blob& haystack, in FindBlobInBlob() argument
27 haystack.begin(), haystack.end(), needle.begin(), needle.end()); in FindBlobInBlob()
28 return (pos != haystack.end()); in FindBlobInBlob()
31 static int FindBlobIndexInBlob(const brillo::Blob& haystack, in FindBlobIndexInBlob() argument
34 haystack.begin(), haystack.end(), needle.begin(), needle.end()); in FindBlobIndexInBlob()
35 if (pos == haystack.end()) { in FindBlobIndexInBlob()
38 return std::distance(haystack.begin(), pos); in FindBlobIndexInBlob()
/external/compiler-rt/lib/sanitizer_common/tests/
Dsanitizer_libc_test.cc170 const char *haystack = "haystack"; in TEST() local
171 EXPECT_EQ(haystack + 2, internal_strchr(haystack, 'y')); in TEST()
172 EXPECT_EQ(haystack + 2, internal_strchrnul(haystack, 'y')); in TEST()
173 EXPECT_EQ(0, internal_strchr(haystack, 'z')); in TEST()
174 EXPECT_EQ(haystack + 8, internal_strchrnul(haystack, 'z')); in TEST()
/external/syslinux/com32/lib/
Dstrstr.c7 char *strstr(const char *haystack, const char *needle) in strstr() argument
9 return (char *)memmem(haystack, strlen(haystack), needle, strlen(needle)); in strstr()
Dmemmem.c14 void *memmem(const void *haystack, size_t n, const void *needle, size_t m) in memmem() argument
16 const unsigned char *y = (const unsigned char *)haystack; in memmem()
/external/mesa3d/src/glx/
Dclientinfo.c86 const char *haystack = src->serverGLXexts; in __glX_send_client_info() local
87 while (haystack != NULL) { in __glX_send_client_info()
88 char *match = strstr(haystack, "GLX_ARB_create_context"); in __glX_send_client_info()
111 haystack = match; in __glX_send_client_info()
/external/mesa3d/src/glx/tests/
Dclientinfo_unittest.cpp682 char *haystack = glx_ext_string; in TEST_F() local
683 while (haystack != NULL) { in TEST_F()
684 char *match = strstr(haystack, needle); in TEST_F()
691 haystack = match + len; in TEST_F()
708 char *haystack = glx_ext_string; in TEST_F() local
709 while (haystack != NULL) { in TEST_F()
710 char *match = strstr(haystack, needle); in TEST_F()
717 haystack = match + len; in TEST_F()
/external/avb/test/
Davb_util_unittest.cc455 const char* haystack = "abc def abcabc"; in TEST_F() local
457 EXPECT_EQ(nullptr, avb_strstr(haystack, "needle")); in TEST_F()
458 EXPECT_EQ(haystack, avb_strstr(haystack, "abc")); in TEST_F()
459 EXPECT_EQ(haystack + 4, avb_strstr(haystack, "def")); in TEST_F()
460 EXPECT_EQ(haystack, avb_strstr(haystack, haystack)); in TEST_F()
/external/perf_data_converter/src/
Dperf_data_handler.cc173 inline bool HasPrefixString(const string& haystack, const char* needle) { in HasPrefixString() argument
175 const size_t haystack_len = haystack.length(); 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
182 const size_t haystack_len = haystack.length(); 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()
/external/valgrind/coregrind/
Dm_libcbase.c415 HChar* VG_(strstr) ( const HChar* haystack, const HChar* needle ) in VG_()
418 if (haystack == NULL) in VG_()
422 if (haystack[0] == 0) in VG_()
424 if (VG_(strncmp)(haystack, needle, n) == 0) in VG_()
425 return CONST_CAST(HChar *,haystack); in VG_()
426 haystack++; in VG_()
430 HChar* VG_(strcasestr) ( const HChar* haystack, const HChar* needle ) in VG_()
433 if (haystack == NULL) in VG_()
437 if (haystack[0] == 0) in VG_()
439 if (VG_(strncasecmp)(haystack, needle, n) == 0) in VG_()
[all …]
/external/avb/libavb/
Davb_util.c228 const char* avb_strstr(const char* haystack, const char* needle) { in avb_strstr() argument
234 for (n = 0; haystack[n] != '\0'; n++) { in avb_strstr()
235 if (haystack[n] != needle[0]) { in avb_strstr()
241 return haystack + n; in avb_strstr()
244 if (haystack[n + m] != needle[m]) { in avb_strstr()
/external/python/cpython3/Modules/cjkcodecs/
Dcjkcodecs.h323 const struct pair_encodemap *haystack, int haystacksize) in find_pairencmap() argument
332 if (value < haystack[pos].uniseq) { in find_pairencmap()
338 else if (value > haystack[pos].uniseq) { in find_pairencmap()
347 if (value == haystack[pos].uniseq) { in find_pairencmap()
348 return haystack[pos].code; in find_pairencmap()
/external/wpa_supplicant_8/src/utils/
Dos_internal.c488 char * os_strstr(const char *haystack, const char *needle) in os_strstr() argument
491 while (*haystack) { in os_strstr()
492 if (os_strncmp(haystack, needle, len) == 0) in os_strstr()
493 return (char *) haystack; in os_strstr()
494 haystack++; in os_strstr()
/external/protobuf/gtest/src/
Dgtest.cc1253 bool IsSubstringPred(const char* needle, const char* haystack) { in IsSubstringPred() argument
1254 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1255 return needle == haystack; in IsSubstringPred()
1257 return strstr(haystack, needle) != NULL; in IsSubstringPred()
1260 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { in IsSubstringPred() argument
1261 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1262 return needle == haystack; in IsSubstringPred()
1264 return wcsstr(haystack, needle) != NULL; in IsSubstringPred()
1270 const StringType& haystack) { in IsSubstringPred() argument
1271 return haystack.find(needle) != StringType::npos; in IsSubstringPred()
[all …]
/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()
1248 const StringType& haystack) { 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()
1249 const StringType& haystack) { in IsSubstringPred() argument
1250 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()
1248 const StringType& haystack) { in IsSubstringPred() argument
1249 return haystack.find(needle) != StringType::npos; in IsSubstringPred()
[all …]
/external/python/cpython2/Modules/cjkcodecs/
Dcjkcodecs.h320 const struct pair_encodemap *haystack, int haystacksize) in find_pairencmap() argument
329 if (value < haystack[pos].uniseq) { in find_pairencmap()
335 else if (value > haystack[pos].uniseq) { in find_pairencmap()
344 if (value == haystack[pos].uniseq) { in find_pairencmap()
345 return haystack[pos].code; in find_pairencmap()
/external/mesa3d/src/gtest/src/
Dgtest.cc1234 bool IsSubstringPred(const char* needle, const char* haystack) { in IsSubstringPred() argument
1235 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1236 return needle == haystack; in IsSubstringPred()
1238 return strstr(haystack, needle) != NULL; in IsSubstringPred()
1241 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { in IsSubstringPred() argument
1242 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1243 return needle == haystack; in IsSubstringPred()
1245 return wcsstr(haystack, needle) != NULL; in IsSubstringPred()
1251 const StringType& haystack) { in IsSubstringPred() argument
1252 return haystack.find(needle) != StringType::npos; in IsSubstringPred()
[all …]
/external/vulkan-validation-layers/tests/gtest-1.7.0/src/
Dgtest.cc1234 bool IsSubstringPred(const char* needle, const char* haystack) { in IsSubstringPred() argument
1235 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1236 return needle == haystack; in IsSubstringPred()
1238 return strstr(haystack, needle) != NULL; in IsSubstringPred()
1241 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { in IsSubstringPred() argument
1242 if (needle == NULL || haystack == NULL) in IsSubstringPred()
1243 return needle == haystack; in IsSubstringPred()
1245 return wcsstr(haystack, needle) != NULL; in IsSubstringPred()
1251 const StringType& haystack) { in IsSubstringPred() argument
1252 return haystack.find(needle) != StringType::npos; in IsSubstringPred()
[all …]
/external/compiler-rt/lib/sanitizer_common/
Dsanitizer_libc.cc225 char *internal_strstr(const char *haystack, const char *needle) { in internal_strstr() argument
227 uptr len1 = internal_strlen(haystack); in internal_strstr()
231 if (internal_memcmp(haystack + pos, needle, len2) == 0) in internal_strstr()
232 return const_cast<char *>(haystack) + pos; in internal_strstr()
/external/v8/testing/gtest/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()
1574 const StringType& haystack) { in IsSubstringPred() argument
1575 return haystack.find(needle) != StringType::npos; in IsSubstringPred()
[all …]

123