summaryrefslogtreecommitdiff
path: root/src/user/lib/include/string.h
blob: 7a5400c279d3d1c1edde734db6cdeb71abec4770 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
#include <shared/mem.h>

// TODO move strto* to stdlib.h
long strtol(const char *restrict s, char **restrict end, int base);
unsigned long strtoul(const char *restrict s, char **restrict end, int base);
unsigned long long strtoull(const char *restrict s, char **restrict end, int base);
double strtod(const char *restrict s, char **restrict end);
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 *strdup(const char *s);

char *strerror(int errnum);