Lines Matching refs:needle

1230 // This group of overloaded functions return true iff needle is a
1234 bool IsSubstringPred(const char* needle, const char* haystack) {
1235 if (needle == NULL || haystack == NULL)
1236 return needle == haystack;
1238 return strstr(haystack, needle) != NULL;
1241 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) {
1242 if (needle == NULL || haystack == NULL)
1243 return needle == haystack;
1245 return wcsstr(haystack, needle) != NULL;
1250 bool IsSubstringPred(const StringType& needle,
1252 return haystack.find(needle) != StringType::npos;
1263 const StringType& needle, const StringType& haystack) {
1264 if (IsSubstringPred(needle, haystack) == expected_to_be_substring)
1267 const bool is_wide_string = sizeof(needle[0]) > 1;
1271 << " Actual: " << begin_string_quote << needle << "\"\n"
1279 // IsSubstring() and IsNotSubstring() check whether needle is a
1285 const char* needle, const char* haystack) {
1286 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1291 const wchar_t* needle, const wchar_t* haystack) {
1292 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1297 const char* needle, const char* haystack) {
1298 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1303 const wchar_t* needle, const wchar_t* haystack) {
1304 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1309 const ::std::string& needle, const ::std::string& haystack) {
1310 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1315 const ::std::string& needle, const ::std::string& haystack) {
1316 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1322 const ::std::wstring& needle, const ::std::wstring& haystack) {
1323 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1328 const ::std::wstring& needle, const ::std::wstring& haystack) {
1329 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);