/bionic/tests/ |
D | string_test.cpp | 1546 const char haystack[] = "big\0daddy/giant\0haystacks!"; in TEST() local 1552 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "", 0)); in TEST() 1554 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "b", 1)); in TEST() 1555 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "bi", 2)); in TEST() 1556 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "big", 3)); in TEST() 1557 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "big\0", 4)); in TEST() 1558 ASSERT_EQ(haystack + 0, memmem(haystack, sizeof(haystack), "big\0d", 5)); in TEST() 1560 ASSERT_EQ(haystack + 2, memmem(haystack, sizeof(haystack), "g", 1)); in TEST() 1561 ASSERT_EQ(haystack + 10, memmem(haystack, sizeof(haystack), "gi", 2)); in TEST() 1562 ASSERT_EQ(haystack + 10, memmem(haystack, sizeof(haystack), "gia", 3)); in TEST() [all …]
|
D | wchar_test.cpp | 231 const wchar_t* haystack = L"big daddy/giant haystacks!"; in TEST() local 235 ASSERT_EQ(haystack, wcsstr(haystack, L"")); in TEST() 238 ASSERT_EQ(haystack, wcsstr(haystack, L"b")); in TEST() 239 ASSERT_EQ(haystack, wcsstr(haystack, L"big")); in TEST() 240 ASSERT_EQ(haystack + 9, wcsstr(haystack, L"/")); in TEST() 241 ASSERT_EQ(haystack + 9, wcsstr(haystack, L"/giant")); in TEST() 242 ASSERT_EQ(haystack + 25, wcsstr(haystack, L"!")); in TEST() 243 ASSERT_EQ(haystack + 19, wcsstr(haystack, L"stacks!")); in TEST() 245 ASSERT_EQ(nullptr, wcsstr(haystack, L"monkey")); 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/benchmarks/ |
D | string_benchmark.cpp | 271 std::vector<char> haystack; in BM_string_strstr() local 273 char* haystack_aligned = GetAlignedPtrFilled(&haystack, haystack_alignment, nbytes, 'x'); in BM_string_strstr() 299 std::vector<char> haystack; in BM_string_strchr() local 300 char* haystack_aligned = GetAlignedPtrFilled(&haystack, haystack_alignment, nbytes, 'x'); in BM_string_strchr()
|
/bionic/libc/bionic/ |
D | ndk_cruft.cpp | 238 wchar_t* wcswcs(wchar_t* haystack, wchar_t* needle) { in wcswcs() argument 239 return wcsstr(haystack, needle); in wcswcs()
|