Lines Matching defs:needle

1553 // This group of overloaded functions return true iff needle is a
1557 bool IsSubstringPred(const char* needle, const char* haystack) {
1558 if (needle == NULL || haystack == NULL)
1559 return needle == haystack;
1561 return strstr(haystack, needle) != NULL;
1564 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) {
1565 if (needle == NULL || haystack == NULL)
1566 return needle == haystack;
1568 return wcsstr(haystack, needle) != NULL;
1573 bool IsSubstringPred(const StringType& needle,
1575 return haystack.find(needle) != StringType::npos;
1586 const StringType& needle, const StringType& haystack) {
1587 if (IsSubstringPred(needle, haystack) == expected_to_be_substring)
1590 const bool is_wide_string = sizeof(needle[0]) > 1;
1594 << " Actual: " << begin_string_quote << needle << "\"\n"
1602 // IsSubstring() and IsNotSubstring() check whether needle is a
1608 const char* needle, const char* haystack) {
1609 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1614 const wchar_t* needle, const wchar_t* haystack) {
1615 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1620 const char* needle, const char* haystack) {
1621 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1626 const wchar_t* needle, const wchar_t* haystack) {
1627 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1632 const ::std::string& needle, const ::std::string& haystack) {
1633 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1638 const ::std::string& needle, const ::std::string& haystack) {
1639 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1645 const ::std::wstring& needle, const ::std::wstring& haystack) {
1646 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1651 const ::std::wstring& needle, const ::std::wstring& haystack) {
1652 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);