• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-runtime/gnulib-lib/

Lines Matching refs:needle

36 knuth_morris_pratt_unibyte (const char *haystack, const char *needle,
39 size_t m = strlen (needle);
48 rhaystack[0..i-1] == needle[0..i-1] and rhaystack[i] != needle[i]
50 forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1],
60 unsigned char b = (unsigned char) needle[i - 1];
64 if (b == (unsigned char) needle[j])
91 if ((unsigned char) needle[j] == (unsigned char) *phaystack)
97 /* The entire needle has been found. */
104 /* Found a match of needle[0..j-1], mismatch at needle[j]. */
110 /* Found a mismatch at needle[0] already. */
122 knuth_morris_pratt_multibyte (const char *haystack, const char *needle,
125 size_t m = mbslen (needle);
142 for (mbui_init (iter, needle); mbui_avail (iter); mbui_advance (iter), j++)
149 rhaystack[0..i-1] == needle[0..i-1] and rhaystack[i] != needle[i]
151 forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1],
198 /* The entire needle has been found. */
205 /* Found a match of needle[0..j-1], mismatch at needle[j]. */
217 /* Found a mismatch at needle[0] already. */
233 mbsstr (const char *haystack, const char *needle)
235 /* Be careful not to look at the entire extent of haystack or needle
237 - haystack may be very long, and a match of needle found early,
238 - needle may be very long, and not even a short initial segment of
239 needle may be found in haystack. */
245 mbui_init (iter_needle, needle);
249 Let n = mbslen(haystack), m = mbslen(needle).
266 mbui_iterator_t iter_needle_last_ccount; /* = needle + last_ccount */
270 mbui_init (iter_needle_last_ccount, needle);
284 /* See if needle + comparison_count now reaches the end of
285 needle. */
297 knuth_morris_pratt_multibyte (haystack, needle,
316 mbui_init (rneedle, needle);
343 if (*needle != '\0')
346 Let n = strlen(haystack), m = strlen(needle).
363 const char *needle_last_ccount = needle; /* = needle + last_ccount */
365 /* Speed up the following searches of needle by caching its first
367 char b = *needle++;
381 /* See if needle + comparison_count now reaches the end of
382 needle. */
397 knuth_morris_pratt_unibyte (haystack, needle - 1,
411 const char *rneedle = needle;