Lines Matching +full:cs +full:- +full:number

1 // SPDX-License-Identifier: GPL-2.0
11 * found in <asm-xx/string.h>), or get overloaded by FORTIFY_SOURCE.
29 #include <asm/word-at-a-time.h>
34 * strncasecmp - Case insensitive, length-limited string comparison
37 * @len: the maximum number of characters to compare
58 } while (--len); in strncasecmp()
59 return (int)c1 - (int)c2; in strncasecmp()
73 return c1 - c2; in strcasecmp()
99 count--; in strncpy()
114 return -E2BIG; in strscpy()
121 if ((long)src & (sizeof(long) - 1)) { in strscpy()
122 size_t limit = PAGE_SIZE - ((long)src & (PAGE_SIZE - 1)); in strscpy()
127 /* If src or dest is unaligned, don't do word-at-a-time. */ in strscpy()
128 if (((long) dest | (long) src) & (sizeof(long) - 1)) in strscpy()
152 count -= sizeof(unsigned long); in strscpy()
153 max -= sizeof(unsigned long); in strscpy()
164 count--; in strscpy()
167 /* Hit buffer length without finding a NUL; force NUL-termination. */ in strscpy()
169 dest[res-1] = '\0'; in strscpy()
171 return -E2BIG; in strscpy()
177 * stpcpy - copy a string from src to dest returning a pointer to the new end
178 * of dest, including src's %NUL-terminator. May overrun dest.
185 * to the new %NUL-terminating character in @dest. (For strcpy, the return
196 return --dest; in stpcpy()
223 if (--count == 0) { in strncat()
245 count -= dsize; in strlcat()
247 len = count-1; in strlcat()
257 * strcmp - Compare two strings
258 * @cs: One string
261 int strcmp(const char *cs, const char *ct) in strcmp() argument
266 c1 = *cs++; in strcmp()
269 return c1 < c2 ? -1 : 1; in strcmp()
280 * strncmp - Compare two length-limited strings
281 * @cs: One string
283 * @count: The maximum number of bytes to compare
285 int strncmp(const char *cs, const char *ct, size_t count) in strncmp() argument
290 c1 = *cs++; in strncmp()
293 return c1 < c2 ? -1 : 1; in strncmp()
296 count--; in strncmp()
305 * strchr - Find the first occurrence of a character in a string
309 * Note that the %NUL-terminator is considered part of the string, and can
324 * strchrnul - Find and return a character in a string, or end of string
341 * strnchrnul - Find and return a character in a length limited string,
344 * @count: The number of characters to be searched
352 while (count-- && *s && *s != (char)c) in strnchrnul()
359 * strrchr - Find the last occurrence of a character in a string
377 * strnchr - Find a character in a length limited string
379 * @count: The number of characters to be searched
382 * Note that the %NUL-terminator is considered part of the string, and can
387 while (count--) { in strnchr()
405 return sc - s; in strlen()
415 for (sc = s; count-- && *sc != '\0'; ++sc) in strnlen()
417 return sc - s; in strnlen()
424 …* strspn - Calculate the length of the initial substring of @s which only contain letters in @acce…
436 return p - s; in strspn()
443 …* strcspn - Calculate the length of the initial substring of @s which does not contain letters in …
455 return p - s; in strcspn()
462 * strpbrk - Find the first occurrence of a set of characters
463 * @cs: The string to be searched
466 char *strpbrk(const char *cs, const char *ct) in strpbrk() argument
470 for (sc = cs; *sc != '\0'; ++sc) { in strpbrk()
481 * strsep - Split a string into tokens
488 * of that name. In fact, it was stolen from glibc2 and de-fancy-fied.
510 * memset - Fill a region of memory with the given value
521 while (count--) in memset()
530 * memset16() - Fill a memory area with a uint16_t
533 * @count: The number of values to store
536 * of a byte. Remember that @count is the number of uint16_ts to
537 * store, not the number of bytes.
543 while (count--) in memset16()
552 * memset32() - Fill a memory area with a uint32_t
555 * @count: The number of values to store
558 * of a byte. Remember that @count is the number of uint32_ts to
559 * store, not the number of bytes.
565 while (count--) in memset32()
574 * memset64() - Fill a memory area with a uint64_t
577 * @count: The number of values to store
580 * of a byte. Remember that @count is the number of uint64_ts to
581 * store, not the number of bytes.
587 while (count--) in memset64()
596 * memcpy - Copy one area of memory to another
609 while (count--) in memcpy()
618 * memmove - Copy one area of memory to another
633 while (count--) in memmove()
640 while (count--) in memmove()
641 *--tmp = *--s; in memmove()
650 * memcmp - Compare two areas of memory
651 * @cs: One area of memory
656 __visible int memcmp(const void *cs, const void *ct, size_t count) in memcmp() argument
663 const unsigned long *u1 = cs; in memcmp()
670 count -= sizeof(unsigned long); in memcmp()
672 cs = u1; in memcmp()
676 for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) in memcmp()
677 if ((res = *su1 - *su2) != 0) in memcmp()
686 * bcmp - returns 0 if and only if the buffers have identical contents.
691 * The sign or magnitude of a non-zero return value has no particular
694 * not rely on anything but whether the return value is zero or non-zero.
705 * memscan - Find a character in an area of memory.
721 size--; in memscan()
730 * strstr - Find the first substring in a %NUL terminated string
743 l1--; in strstr()
755 * strnstr - Find the first substring in a length-limited string
758 * @len: the maximum number of characters to search
768 len--; in strnstr()
780 * memchr - Find a character in an area of memory.
791 while (n-- != 0) { in memchr()
793 return (void *)(p - 1); in memchr()
807 bytes--; in check_bytes8()
813 * memchr_inv - Find an unmatching character in an area of memory.
846 prefix = 8 - prefix; in memchr_inv()
851 bytes -= prefix; in memchr_inv()
860 words--; in memchr_inv()