PSXSDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
string.h
Go to the documentation of this file.
1 /*
2  * string.h
3  *
4  * Prototypes for string functions of the C library
5  *
6  * PSXSDK
7  */
8 
9 // NOTE: The BIOS was found to be unreliable for many functions,
10 // so it is not used anymore for the libc.
11 
12 #ifndef _STRING_H
13 #define _STRING_H
14 
15 #include <strings.h> // for backwards compatibility
16 #include <types.h>
17 
18 char *strcat(char *s , const char *append);
19 char *strncat(char *s , const char *append, size_t n);
20 int strcmp(const char *dst , const char *src);
21 int strncmp(const char *dst , const char *src , size_t len);
22 int stricmp(const char *s1, const char *s2); // alias of strcasecmp
23 int strnicmp(const char *s1, const char *s2, size_t len); // alias of strncasecmp
24 char *strcpy(char *dst , const char *src);
25 char *strncpy(char *dst , const char *src , size_t n);
26 int strlen(const char *s);
27 int strnlen(const char *s, size_t maxlen);
28 char *strchr(const char *s , int c);
29 char *strrchr(const char *s , int c);
30 char *strpbrk(const char *dst , const char *src);
31 int strspn(const char *s , const char *charset);
32 int strcspn(const char *s , const char *charset);
33 char *strsep(char **stringp, const char *delim);
34 char *strtok(char *str, const char *sep);
35 char *strstr(const char *big , const char *little);
36 char *strcasestr(const char *big, const char *little);
37 char *strlwr(char *string);
38 char *strupr(char *string);
39 char *strdup(const char *str);
40 char *strndup(const char *str, size_t len);
41 int strlcpy(char *dst, const char *src, size_t size);
42 int strlcat(char *dst, const char *src, size_t size);
43 
44 void *memset(void *dst , char c , size_t n);
45 void *memmove(void *dst , const void *src , size_t n);
46 int memcmp(const void *b1 , const void *b2 , size_t n);
47 void *memchr(void *s , int c , size_t n);
48 void *memrchr(void *b, int c, size_t len);
49 void *memcpy(void *dst , const void *src , size_t len);
50 void *memccpy(void *dst, const void *src, int c, size_t len);
51 void *memmem(const void *big, size_t big_len, const void *little, size_t little_len);
52 
53 // ffsl() and ffsll() are glibc extensions, and are in string.h
54 // instead of strings.h (like ffs()) for some reason..
55 
56 int ffsl(long value);
57 int ffsll(long long value);
58 
59 #endif
60