From 642b5fb0007b64c77d186fcb018d571152ee1d47 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Mon, 14 Aug 2023 18:51:07 +0200 Subject: reorganization: first steps --- src/libc/include/string.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/libc/include/string.h (limited to 'src/libc/include/string.h') diff --git a/src/libc/include/string.h b/src/libc/include/string.h new file mode 100644 index 0000000..78bed9b --- /dev/null +++ b/src/libc/include/string.h @@ -0,0 +1,25 @@ +#pragma once +#include +#include /* work around bad include in dash */ + +char *strchr(const char *s, int c); +char *strrchr(const char *s, int c); + +size_t strspn(const char *s, const char *accept); +size_t strcspn(const char *s, const char *reject); +char *strpbrk(const char *s1, const char *s2); + +char *strtok(char *restrict s, const char *restrict sep); +char *strtok_r(char *restrict s, const char *restrict sep, char **restrict state); + +int strncmp(const char *s1, const char *s2, size_t n); +int strcoll(const char *s1, const char *s2); + +char *strstr(const char *s1, const char *s2); + +char *strcpy(char *restrict s1, const char *restrict s2); +char *strncpy(char *restrict s1, const char *restrict s2, size_t n); +char *stpncpy(char *restrict dst, const char *restrict src, size_t n); +char *strdup(const char *s); + +char *strerror(int errnum); -- cgit v1.2.3