Searched refs:haystack (Results 1 – 8 of 8) sorted by relevance
/bionic/tests/ |
D | string_test.cpp | 1541 const char haystack[] = "big\0daddy\0giant\0haystacks"; in TEST() local 1542 ASSERT_EQ(haystack, memmem(haystack, sizeof(haystack), "", 0)); in TEST() 1543 ASSERT_EQ(haystack + 3, memmem(haystack, sizeof(haystack), "", 1)); in TEST() 1544 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "b", 1)); in TEST() 1545 ASSERT_EQ(haystack + 1, memmem(haystack, sizeof(haystack), "i", 1)); in TEST() 1546 ASSERT_EQ(haystack + 4, memmem(haystack, sizeof(haystack), "da", 2)); in TEST() 1547 ASSERT_EQ(haystack + 8, memmem(haystack, sizeof(haystack), "y\0g", 3)); in TEST() 1551 const char* haystack = "big daddy/giant haystacks!"; in TEST() local 1557 ASSERT_EQ(haystack + 0, strstr(haystack, "")); in TEST() 1559 ASSERT_EQ(haystack + 0, strstr(haystack, "b")); in TEST() [all …]
|
D | wchar_test.cpp | 231 const wchar_t* haystack = L"matches hello world, not the second hello world"; in TEST() local 236 ASSERT_EQ(haystack, wcsstr(haystack, empty_needle)); in TEST() 237 ASSERT_EQ(&haystack[10], wcsstr(haystack, good_needle)); in TEST() 238 ASSERT_EQ(nullptr, wcsstr(haystack, bad_needle)); in TEST()
|
D | dlfcn_test.cpp | 58 #define ASSERT_SUBSTR(needle, haystack) \ argument 59 ASSERT_PRED_FORMAT2(::testing::IsSubstring, needle, haystack)
|
D | dlext_test.cpp | 57 #define ASSERT_SUBSTR(needle, haystack) \ argument 58 ASSERT_PRED_FORMAT2(::testing::IsSubstring, needle, haystack)
|
/bionic/linker/ |
D | linker_utils.cpp | 121 const char* haystack = file.c_str(); in file_is_in_dir() local 124 return strncmp(haystack, needle, needle_len) == 0 && in file_is_in_dir() 125 haystack[needle_len] == '/' && in file_is_in_dir() 126 strchr(haystack + needle_len + 1, '/') == nullptr; in file_is_in_dir() 131 const char* haystack = file.c_str(); in file_is_under_dir() local 134 return strncmp(haystack, needle, needle_len) == 0 && in file_is_under_dir() 135 haystack[needle_len] == '/'; in file_is_under_dir()
|
/bionic/libc/bionic/ |
D | memmem.cpp | 32 const unsigned char* haystack = reinterpret_cast<const unsigned char*>(void_haystack); in memmem() local 38 if (m == 1) return const_cast<void*>(memchr(haystack, needle[0], n)); in memmem() 42 const unsigned char* y = haystack; in memmem()
|
D | ndk_cruft.cpp | 238 wchar_t* wcswcs(wchar_t* haystack, wchar_t* needle) { in wcswcs() argument 239 return wcsstr(haystack, needle); in wcswcs()
|
/bionic/benchmarks/ |
D | string_benchmark.cpp | 275 std::vector<char> haystack; in BM_string_strstr() local 277 char* haystack_aligned = GetAlignedPtrFilled(&haystack, haystack_alignment, nbytes, 'x'); in BM_string_strstr() 303 std::vector<char> haystack; in BM_string_strchr() local 304 char* haystack_aligned = GetAlignedPtrFilled(&haystack, haystack_alignment, nbytes, 'x'); in BM_string_strchr()
|