1 /* SPDX-License-Identifier: GPL-2.0-only */
6 #include <stdarg.h> /* IWYU pragma: export */
8 #include <stdio.h> /* IWYU pragma: export */
10 void *memcpy(void *dest
, const void *src
, size_t n
);
11 void *memmove(void *dest
, const void *src
, size_t n
);
12 void *memset(void *s
, int c
, size_t n
);
13 int memcmp(const void *s1
, const void *s2
, size_t n
);
14 void *memchr(const void *s
, int c
, size_t n
);
15 char *strdup(const char *s
);
16 char *strconcat(const char *s1
, const char *s2
);
17 size_t strnlen(const char *src
, size_t max
);
18 size_t strlen(const char *src
);
19 char *strchr(const char *s
, int c
);
20 char *strncpy(char *to
, const char *from
, int count
);
21 char *strcpy(char *dst
, const char *src
);
22 int strcmp(const char *s1
, const char *s2
);
23 int strncmp(const char *s1
, const char *s2
, int maxlen
);
24 int strspn(const char *str
, const char *spn
);
25 int strcspn(const char *str
, const char *spn
);
26 char *strstr(const char *haystack
, const char *needle
);
27 char *strtok_r(char *str
, const char *delim
, char **ptr
);
28 char *strtok(char *str
, const char *delim
);
29 long atol(const char *str
);
32 * Find a character in a string.
34 * @param s The string.
35 * @param c The character.
36 * @return A pointer to the last occurrence of the character in the
37 * string, or NULL if the character was not encountered within the string.
39 char *strrchr(const char *s
, int c
);
42 * Parses an unsigned integer and moves the input pointer forward to the first
43 * character that's not a valid digit. s and *s must not be NULL. Result
44 * undefined if it overruns the return type size.
46 unsigned int skip_atoi(char **s
);