PSXSDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
strings.h
Go to the documentation of this file.
1 /*
2  * strings.h
3  *
4  * PSXSDK
5  */
6 
7 #ifndef _STRINGS_H
8 #define _STRINGS_H
9 
10 #include <string.h>
11 #include <types.h>
12 
13 #define bcopy(src,dst,len) memmove(dst,src,len)
14 #define bzero(ptr, len) memset(ptr, 0, len)
15 #define bcmp(b1,b2,len) memcmp(b1,b2,len)
16 #define index(s, c) strchr(s, c)
17 #define rindex(s, c) strrchr(s, c)
18 
19 int ffs(int value);
20 char *index(const char *s, int c);
21 char *rindex(const char *s, int c);
22 
29 unsigned int popcount(unsigned int value);
30 unsigned int popcountl(unsigned long value);
31 unsigned int popcountll(unsigned long long value);
32 unsigned int popcount32(uint32_t value);
33 unsigned int popcount64(uint64_t value);
34 int strcasecmp(const char *s1, const char *s2);
35 int strncasecmp(const char *s1, const char *s2, size_t len);
36 
37 #endif