Lines Matching refs:haystack
1228 // substring of haystack. NULL is considered a substring of itself
1231 bool IsSubstringPred(const char* needle, const char* haystack) {
1232 if (needle == NULL || haystack == NULL)
1233 return needle == haystack;
1235 return strstr(haystack, needle) != NULL;
1238 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) {
1239 if (needle == NULL || haystack == NULL)
1240 return needle == haystack;
1242 return wcsstr(haystack, needle) != NULL;
1248 const StringType& haystack) {
1249 return haystack.find(needle) != StringType::npos;
1260 const StringType& needle, const StringType& haystack) {
1261 if (IsSubstringPred(needle, haystack) == expected_to_be_substring)
1271 << "Which is: " << begin_string_quote << haystack << "\"";
1277 // substring of haystack (NULL is considered a substring of itself
1282 const char* needle, const char* haystack) {
1283 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1288 const wchar_t* needle, const wchar_t* haystack) {
1289 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1294 const char* needle, const char* haystack) {
1295 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1300 const wchar_t* needle, const wchar_t* haystack) {
1301 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1306 const ::std::string& needle, const ::std::string& haystack) {
1307 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1312 const ::std::string& needle, const ::std::string& haystack) {
1313 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);
1319 const ::std::wstring& needle, const ::std::wstring& haystack) {
1320 return IsSubstringImpl(true, needle_expr, haystack_expr, needle, haystack);
1325 const ::std::wstring& needle, const ::std::wstring& haystack) {
1326 return IsSubstringImpl(false, needle_expr, haystack_expr, needle, haystack);