sgdk
string.h
Go to the documentation of this file.
00001 
00013 #if (ENABLE_NEWLIB != 0) && !defined(_NEWLIB_STRING_H_)
00014 #define _NEWLIB_STRING_H_
00015 #include_next <string.h> // Include string.h from newlib
00016 #undef _STRING_H_        // Will be defined again just below
00017 #endif
00018 
00019 #ifndef _STRING_H_
00020 #define _STRING_H_
00021 
00022 #if (ENABLE_NEWLIB == 0) || !defined(ENABLE_NEWLIB)
00023 
00028 #define isdigit(c)      ((c) >= '0' && (c) <= '9')
00029 
00030 
00031 typedef void *__gnuc_va_list;
00032 typedef __gnuc_va_list va_list;
00033 
00034 #define va_start(v,l) __builtin_va_start(v,l)
00035 #define va_end(v) __builtin_va_end(v)
00036 #define va_arg(v,l) __builtin_va_arg(v,l)
00037 
00038 
00049 u16 strlen(const char *str);
00064 u16 strnlen(const char *str, u16 maxlen);
00082 s16 strcmp(const char *str1, const char *str2);
00083 
00096 char* strcpy(char *dest, const char *src);
00111 char* strncpy(char *dest, const char *src, u16 len);
00124 char* strcat(char *dest, const char *src);
00150 u16 sprintf(char *buffer,const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
00151 
00152 #endif  // ENABLE_NEWLIB
00153 
00164 char* strclr(char *str);
00179 char *strreplacechar(char *str, char oldc, char newc);
00195 u16 intToStr(s32 value, char *str, u16 minsize);
00211 u16 uintToStr(u32 value, char *str, u16 minsize);
00227 u16 intToHex(u32 value, char *str, u16 minsize);
00228 
00242 void fix32ToStr(fix32 value, char *str, u16 numdec);
00256 void fix16ToStr(fix16 value, char *str, u16 numdec);
00257 
00258 #endif // _STRING_H_
00259 
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines