Home
last modified time | relevance | path

Searched refs:needle (Results 1 – 25 of 47) sorted by relevance

12

/freebsd/contrib/llvm-project/llvm/include/llvm/Demangle/
H A DStringViewExtras.h29 std::string_view needle) noexcept { in starts_with() argument
30 if (needle.size() > haystack.size()) in starts_with()
32 haystack.remove_suffix(haystack.size() - needle.size()); in starts_with()
33 return haystack == needle; in starts_with()
/freebsd/contrib/pkgconf/libpkgconf/
H A Dbuffer.c407 pkgconf_buffer_contains(const pkgconf_buffer_t *haystack, const pkgconf_buffer_t *needle) in pkgconf_buffer_contains() argument
410 const char *needle_str = pkgconf_buffer_str_or_empty(needle); in pkgconf_buffer_contains()
428 pkgconf_buffer_contains_byte(const pkgconf_buffer_t *haystack, char needle) in pkgconf_buffer_contains_byte() argument
431 return strchr(haystack_str, needle) != NULL; in pkgconf_buffer_contains_byte()
446 pkgconf_buffer_match(const pkgconf_buffer_t *haystack, const pkgconf_buffer_t *needle) in pkgconf_buffer_match() argument
449 const char *needle_str = pkgconf_buffer_str_or_empty(needle); in pkgconf_buffer_match()
451 if (pkgconf_buffer_len(haystack) != pkgconf_buffer_len(needle)) in pkgconf_buffer_match()
H A Dlibpkgconf.h607 …API bool pkgconf_buffer_contains(const pkgconf_buffer_t *haystack, const pkgconf_buffer_t *needle);
608 PKGCONF_API bool pkgconf_buffer_contains_byte(const pkgconf_buffer_t *haystack, char needle);
609 …NF_API bool pkgconf_buffer_match(const pkgconf_buffer_t *haystack, const pkgconf_buffer_t *needle);
/freebsd/contrib/pam_modules/pam_passwdqc/
H A Dpasswdqc_check.c196 const char *haystack, const char *needle, const char *original) in is_based() argument
210 if (strstr(haystack, needle)) /* based on haystack entirely */ in is_based()
215 length = strlen(needle); in is_based()
220 if (*p == needle[i] && !strncmp(p, &needle[i], j)) { in is_based()
255 const char *needle, const char *original) in is_word_based() argument
266 if (is_based(params, unified, needle, original)) { in is_word_based()
/freebsd/contrib/pkgconf/tests/api/
H A Dtest-buffer.c191 pkgconf_buffer_t needle = PKGCONF_BUFFER_INITIALIZER; in test_buffer_contains() local
195 pkgconf_buffer_append(&needle, "quick"); in test_buffer_contains()
196 TEST_ASSERT_TRUE(pkgconf_buffer_contains(&hay, &needle)); in test_buffer_contains()
198 pkgconf_buffer_reset(&needle); in test_buffer_contains()
199 pkgconf_buffer_append(&needle, "slow"); in test_buffer_contains()
200 TEST_ASSERT_FALSE(pkgconf_buffer_contains(&hay, &needle)); in test_buffer_contains()
206 pkgconf_buffer_finalize(&needle); in test_buffer_contains()
H A Dtest-api.h153 #define TEST_ASSERT_STRSTR(haystack, needle) \ argument
156 const char *_n = (needle); \
159 #haystack, #needle, \
/freebsd/contrib/ncurses/ncurses/tinfo/
H A Dstrings.c49 _nc_strstr(const char *haystack, const char *needle) in NCURSES_EXPORT()
52 size_t len2 = strlen(needle); in NCURSES_EXPORT()
56 if (!strncmp(haystack, needle, len2)) { in NCURSES_EXPORT()
/freebsd/contrib/libarchive/libarchive/test/
H A Dtest_write_format_pax_align.c73 memory_contains(const char *memory, size_t memory_size, const char *needle) in memory_contains() argument
75 size_t needle_size = strlen(needle); in memory_contains()
79 if (memcmp(memory + i, needle, needle_size) == 0) in memory_contains()
/freebsd/contrib/llvm-project/compiler-rt/lib/fuzzer/
H A DFuzzerInterceptors.cpp107 static char *internal_strstr(const char *haystack, const char *needle) { in internal_strstr() argument
110 size_t len2 = internal_strlen(needle); in internal_strstr()
114 if (internal_memcmp(haystack + pos, needle, len2) == 0) in internal_strstr()
H A DFuzzerUtil.h69 const void *needle, size_t needlelen);
/freebsd/sys/contrib/zstd/programs/
H A Dutil.c996 const char *needle = pathname; in pathnameHas2Dots() local
998 needle = strstr(needle, ".."); in pathnameHas2Dots()
1000 if (needle == NULL) { in pathnameHas2Dots()
1004 if ((needle == pathname || needle[-1] == PATH_SEP) in pathnameHas2Dots()
1005 && (needle[2] == '\0' || needle[2] == PATH_SEP)) { in pathnameHas2Dots()
1010 needle++; in pathnameHas2Dots()
/freebsd/contrib/libarchive/libarchive/
H A Darchive_read_support_format_warc.c470 const char *needle, const size_t needlesize) in xmemmem() argument
473 const char *const eon = needle + needlesize; in xmemmem()
486 } else if ((hay = memchr(hay, *needle, haysize)) == NULL) { in xmemmem()
494 for (hp = hay + 1U, np = needle + 1U, hsum = *hay, nsum = *hay, eqp = 1U; in xmemmem()
516 if (hsum == nsum && memcmp(cand, needle, needlesize - 1U) == 0) { in xmemmem()
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_libc.cpp243 char *internal_strstr(const char *haystack, const char *needle) { in internal_simple_strtoll()
246 uptr len2 = internal_strlen(needle); in internal_simple_strtoll()
249 if (internal_memcmp(haystack + pos, needle, len2) == 0) in internal_simple_strtoll()
227 internal_strstr(const char * haystack,const char * needle) internal_strstr() argument
H A Dsanitizer_libc.h67 char *internal_strstr(const char *haystack, const char *needle);
/freebsd/contrib/wpa/src/utils/
H A Dos_internal.c478 char * os_strstr(const char *haystack, const char *needle) in os_strstr() argument
480 size_t len = os_strlen(needle); in os_strstr()
482 if (os_strncmp(haystack, needle, len) == 0) in os_strstr()
H A Dos_none.c232 char * os_strstr(const char *haystack, const char *needle) in os_strstr() argument
/freebsd/contrib/less/
H A Dos.c559 char * strstr(constant char *haystack, constant char *needle) in strstr() argument
561 if (*needle == '\0') in strstr()
565 constant char *n = needle; in strstr()
/freebsd/contrib/llvm-project/openmp/runtime/src/
H A Dompt-specific.h92 #define OMPT_STR_MATCH(haystack, needle) __kmp_str_match(haystack, 0, needle) argument
/freebsd/contrib/googletest/googletest/include/gtest/
H A Dgtest.h1538 const char* needle,
1542 const wchar_t* needle,
1546 const char* needle,
1550 const wchar_t* needle,
1554 const ::std::string& needle,
1558 const ::std::string& needle,
1564 const ::std::wstring& needle,
1568 const ::std::wstring& needle,
/freebsd/tests/sys/pmc/
H A Dpmc_exterr_test.c66 require_exterr(const char *needle) in require_exterr() argument
71 ATF_REQUIRE_MSG(strstr(exterr, needle) != NULL, in require_exterr()
72 "extended error \"%s\" does not contain \"%s\"", exterr, needle); in require_exterr()
/freebsd/contrib/googletest/googletest/src/
H A Dgtest.cc1841 bool IsSubstringPred(const char* needle, const char* haystack) { in IsSubstringPred() argument
1842 if (needle == nullptr || haystack == nullptr) return needle == haystack; in IsSubstringPred()
1844 return strstr(haystack, needle) != nullptr; in IsSubstringPred()
1847 bool IsSubstringPred(const wchar_t* needle, const wchar_t* haystack) { in IsSubstringPred() argument
1848 if (needle == nullptr || haystack == nullptr) return needle == haystack; in IsSubstringPred()
1850 return wcsstr(haystack, needle) != nullptr; in IsSubstringPred()
1855 bool IsSubstringPred(const StringType& needle, const StringType& haystack) { in IsSubstringPred() argument
1856 return haystack.find(needle) != StringType::npos; in IsSubstringPred()
1867 const StringType& needle, in IsSubstringImpl() argument
1869 if (IsSubstringPred(needle, haystack) == expected_to_be_substring) in IsSubstringImpl()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/asan/
H A Dasan_mac.cpp67 void AsanApplyToGlobals(globals_op_fptr op, const void *needle) { in AsanApplyToGlobals() argument
70 int err = dladdr(needle, &info); in AsanApplyToGlobals()
H A Dasan_internal.h106 void AsanApplyToGlobals(globals_op_fptr op, const void *needle);
H A Dasan_linux.cpp112 void AsanApplyToGlobals(globals_op_fptr op, const void *needle) { in AsanApplyToGlobals() argument
/freebsd/contrib/wpa/src/drivers/
H A Ddriver_macsec_linux.c1128 struct rtnl_link *needle; in lookup_sc() local
1131 needle = rtnl_link_macsec_alloc(); in lookup_sc()
1132 if (!needle) in lookup_sc()
1135 rtnl_link_set_link(needle, parent); in lookup_sc()
1136 rtnl_link_macsec_set_sci(needle, sci); in lookup_sc()
1138 rtnl_link_macsec_set_cipher_suite(needle, cs); in lookup_sc()
1140 match = nl_cache_find(cache, (struct nl_object *) needle); in lookup_sc()
1141 rtnl_link_put(needle); in lookup_sc()

12