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.
31 #include <asm/word-at-a-time.h>
35 * strncasecmp - Case insensitive, length-limited string comparison
38 * @len: the maximum number of characters to compare
59 } while (--len); in strncasecmp()
60 return (int)c1 - (int)c2; in strncasecmp()
74 return c1 - c2; in strcasecmp()
100 count--; in strncpy()
120 return -E2BIG; in sized_strscpy()
128 if ((long)src & (sizeof(long) - 1)) { in sized_strscpy()
129 size_t limit = PAGE_SIZE - ((long)src & (PAGE_SIZE - 1)); in sized_strscpy()
134 /* If src or dest is unaligned, don't do word-at-a-time. */ in sized_strscpy()
135 if (((long) dest | (long) src) & (sizeof(long) - 1)) in sized_strscpy()
163 count -= sizeof(unsigned long); in sized_strscpy()
167 return -E2BIG; in sized_strscpy()
171 max -= sizeof(unsigned long); in sized_strscpy()
182 count--; in sized_strscpy()
185 /* Force NUL-termination. */ in sized_strscpy()
189 return src[res] ? -E2BIG : res; in sized_strscpy()
194 * stpcpy - copy a string from src to dest returning a pointer to the new end
195 * of dest, including src's %NUL-terminator. May overrun dest.
202 * to the new %NUL-terminating character in @dest. (For strcpy, the return
213 return --dest; in stpcpy()
240 if (--count == 0) { in strncat()
262 count -= dsize; in strlcat()
264 len = count-1; in strlcat()
274 * strcmp - Compare two strings
275 * @cs: One string
278 int strcmp(const char *cs, const char *ct) in strcmp() argument
283 c1 = *cs++; in strcmp()
286 return c1 < c2 ? -1 : 1; in strcmp()
297 * strncmp - Compare two length-limited strings
298 * @cs: One string
300 * @count: The maximum number of bytes to compare
302 int strncmp(const char *cs, const char *ct, size_t count) in strncmp() argument
307 c1 = *cs++; in strncmp()
310 return c1 < c2 ? -1 : 1; in strncmp()
313 count--; in strncmp()
322 * strchr - Find the first occurrence of a character in a string
326 * Note that the %NUL-terminator is considered part of the string, and can
341 * strchrnul - Find and return a character in a string, or end of string
358 * strnchrnul - Find and return a character in a length limited string,
361 * @count: The number of characters to be searched
369 while (count-- && *s && *s != (char)c) in strnchrnul()
376 * strrchr - Find the last occurrence of a character in a string
394 * strnchr - Find a character in a length limited string
396 * @count: The number of characters to be searched
399 * Note that the %NUL-terminator is considered part of the string, and can
404 while (count--) { in strnchr()
422 return sc - s; in strlen()
432 for (sc = s; count-- && *sc != '\0'; ++sc) in strnlen()
434 return sc - s; in strnlen()
441 …* strspn - Calculate the length of the initial substring of @s which only contain letters in @acce…
453 return p - s; in strspn()
460 …* strcspn - Calculate the length of the initial substring of @s which does not contain letters in …
472 return p - s; in strcspn()
479 * strpbrk - Find the first occurrence of a set of characters
480 * @cs: The string to be searched
483 char *strpbrk(const char *cs, const char *ct) in strpbrk() argument
487 for (sc = cs; *sc != '\0'; ++sc) { in strpbrk()
498 * strsep - Split a string into tokens
505 * of that name. In fact, it was stolen from glibc2 and de-fancy-fied.
527 * memset - Fill a region of memory with the given value
538 while (count--) in memset()
547 * memset16() - Fill a memory area with a uint16_t
550 * @count: The number of values to store
553 * of a byte. Remember that @count is the number of uint16_ts to
554 * store, not the number of bytes.
560 while (count--) in memset16()
569 * memset32() - Fill a memory area with a uint32_t
572 * @count: The number of values to store
575 * of a byte. Remember that @count is the number of uint32_ts to
576 * store, not the number of bytes.
582 while (count--) in memset32()
591 * memset64() - Fill a memory area with a uint64_t
594 * @count: The number of values to store
597 * of a byte. Remember that @count is the number of uint64_ts to
598 * store, not the number of bytes.
604 while (count--) in memset64()
613 * memcpy - Copy one area of memory to another
626 while (count--) in memcpy()
635 * memmove - Copy one area of memory to another
650 while (count--) in memmove()
657 while (count--) in memmove()
658 *--tmp = *--s; in memmove()
667 * memcmp - Compare two areas of memory
668 * @cs: One area of memory
673 __visible int memcmp(const void *cs, const void *ct, size_t count) in memcmp() argument
680 const unsigned long *u1 = cs; in memcmp()
687 count -= sizeof(unsigned long); in memcmp()
689 cs = u1; in memcmp()
693 for (su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) in memcmp()
694 if ((res = *su1 - *su2) != 0) in memcmp()
703 * bcmp - returns 0 if and only if the buffers have identical contents.
708 * The sign or magnitude of a non-zero return value has no particular
711 * not rely on anything but whether the return value is zero or non-zero.
722 * memscan - Find a character in an area of memory.
738 size--; in memscan()
747 * strstr - Find the first substring in a %NUL terminated string
760 l1--; in strstr()
772 * strnstr - Find the first substring in a length-limited string
775 * @len: the maximum number of characters to search
785 len--; in strnstr()
797 * memchr - Find a character in an area of memory.
808 while (n-- != 0) { in memchr()
810 return (void *)(p - 1); in memchr()
824 bytes--; in check_bytes8()
830 * memchr_inv - Find an unmatching character in an area of memory.
863 prefix = 8 - prefix; in memchr_inv()
868 bytes -= prefix; in memchr_inv()
877 words--; in memchr_inv()