Lines Matching refs:needle

1227 // This group of overloaded functions return true iff needle is a
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;
1247 bool IsSubstringPred(const StringType& needle,
1249 return haystack.find(needle) != StringType::npos;
1260 const StringType& needle, const StringType& haystack) {
1261 if (IsSubstringPred(needle, haystack) == expected_to_be_substring)
1264 const bool is_wide_string = sizeof(needle[0]) > 1;
1268 << " Actual: " << begin_string_quote << needle << "\"\n"
1276 // IsSubstring() and IsNotSubstring() check whether needle is a
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);