1 /* SPDX-License-Identifier: GPL-2.0-only */
6 #include <commonlib/bsd/string.h>
9 void *memcpy(void *dest
, const void *src
, size_t n
);
10 void *memmove(void *dest
, const void *src
, size_t n
);
11 void *memset(void *s
, int c
, size_t n
);
12 int memcmp(const void *s1
, const void *s2
, size_t n
);
13 void *memchr(const void *s
, int c
, size_t n
);
14 char *strdup(const char *s
);
15 char *strconcat(const char *s1
, const char *s2
);
16 char *strchr(const char *s
, int c
);
17 char *strncpy(char *to
, const char *from
, size_t count
);
18 char *strcpy(char *dst
, const char *src
);
19 int strcmp(const char *s1
, const char *s2
);
20 int strncmp(const char *s1
, const char *s2
, size_t maxlen
);
21 size_t strspn(const char *str
, const char *spn
);
22 size_t strcspn(const char *str
, const char *spn
);
23 char *strstr(const char *haystack
, const char *needle
);
24 char *strtok_r(char *str
, const char *delim
, char **ptr
);
25 char *strtok(char *str
, const char *delim
);
26 long atol(const char *str
);
29 * Find a character in a string.
31 * @param s The string.
32 * @param c The character.
33 * @return A pointer to the last occurrence of the character in the
34 * string, or NULL if the character was not encountered within the string.
36 char *strrchr(const char *s
, int c
);