-
Notifications
You must be signed in to change notification settings - Fork 16
/
string.h
26 lines (20 loc) · 710 Bytes
/
string.h
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
#include <stddef.h>
void *memcpy(void *dst, void *src, long n);
void *memmove(void *dst, void *src, long n);
void *memset(void *s, int v, long n);
void *memchr(void *s, int c, long n);
void *memrchr(void *s, int c, long n);
int memcmp(char *s1, char *s2, long n);
char *strcpy(char *dst, char *src);
char *strchr(char *s, int c);
char *strrchr(char *s, int c);
long strlen(char *s);
int strcmp(char *s1, char *s2);
char *strncpy(char *d, char *s, long n);
char *strcat(char *d, char *s);
int strncmp(char *d, char *s, long n);
char *strstr(char *s, char *r);
char *strdup(const char *s);
/* faster implementations */
#define memchr(s, c, n) __memchr_c(s, c, n)
void *__memchr_c(void *s, int c, long n);