Home
last modified time | relevance | path

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

/bionic/tests/
Dstring_test.cpp1541 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 …]
Dwchar_test.cpp231 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()
Ddlfcn_test.cpp58 #define ASSERT_SUBSTR(needle, haystack) \ argument
59 ASSERT_PRED_FORMAT2(::testing::IsSubstring, needle, haystack)
Ddlext_test.cpp57 #define ASSERT_SUBSTR(needle, haystack) \ argument
58 ASSERT_PRED_FORMAT2(::testing::IsSubstring, needle, haystack)
/bionic/linker/
Dlinker_utils.cpp121 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/
Dmemmem.cpp32 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()
Dndk_cruft.cpp238 wchar_t* wcswcs(wchar_t* haystack, wchar_t* needle) { in wcswcs() argument
239 return wcsstr(haystack, needle); in wcswcs()
/bionic/benchmarks/
Dstring_benchmark.cpp275 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()