Lines Matching refs:haystack
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()
1560 ASSERT_EQ(haystack + 0, strstr(haystack, "bi")); in TEST()
1561 ASSERT_EQ(haystack + 0, strstr(haystack, "big")); in TEST()
1562 ASSERT_EQ(haystack + 0, strstr(haystack, "big ")); in TEST()
1563 ASSERT_EQ(haystack + 0, strstr(haystack, "big d")); in TEST()
1565 ASSERT_EQ(haystack + 2, strstr(haystack, "g")); in TEST()
1566 ASSERT_EQ(haystack + 10, strstr(haystack, "gi")); in TEST()
1567 ASSERT_EQ(haystack + 10, strstr(haystack, "gia")); in TEST()
1568 ASSERT_EQ(haystack + 10, strstr(haystack, "gian")); in TEST()
1569 ASSERT_EQ(haystack + 10, strstr(haystack, "giant")); in TEST()
1571 ASSERT_EQ(haystack + 25, strstr(haystack, "!")); in TEST()
1572 ASSERT_EQ(haystack + 24, strstr(haystack, "s!")); in TEST()
1573 ASSERT_EQ(haystack + 23, strstr(haystack, "ks!")); in TEST()
1574 ASSERT_EQ(haystack + 22, strstr(haystack, "cks!")); in TEST()
1575 ASSERT_EQ(haystack + 21, strstr(haystack, "acks!")); in TEST()
1579 const char* haystack = "bIg dAdDy/gIaNt hAyStAcKs"; in TEST() local
1580 ASSERT_EQ(haystack, strcasestr(haystack, "")); in TEST()
1581 ASSERT_EQ(haystack + 0, strcasestr(haystack, "B")); in TEST()
1582 ASSERT_EQ(haystack + 1, strcasestr(haystack, "i")); in TEST()
1583 ASSERT_EQ(haystack + 4, strcasestr(haystack, "Da")); in TEST()