13#if (ENABLE_NEWLIB != 0) && !defined(_NEWLIB_STRING_H_)
14#define _NEWLIB_STRING_H_
15#include_next <string.h>
22#if (ENABLE_NEWLIB == 0)
28#define isdigit(c) ((c) >= '0' && (c) <= '9')
31typedef void *__gnuc_va_list;
32typedef __gnuc_va_list va_list;
34#define va_start(v,l) __builtin_va_start(v,l)
35#define va_end(v) __builtin_va_end(v)
36#define va_arg(v,l) __builtin_va_arg(v,l)
82s8 strcmp(
const char *str1,
const char *str2);
96char*
strcpy(
char *dest,
const char *src);
111char*
strncpy(
char *dest,
const char *src,
u16 len);
124char*
strcat(
char *dest,
const char *src);
138char*
strchr(
const char *from,
char c);
163int vsprintf(
char *buffer,
const char *fmt, va_list args);
188int sprintf(
char *buffer,
const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
u16 strlen(const char *str)
Calculate the length of a string (limited to 65535 characters maximum).
Definition string.c:42
char * strchr(const char *from, char c)
Search for a character in the specified string.
Definition string.c:129
void fastFix16ToStr(fastfix16 value, char *str, u16 numdec)
Convert a fastfix16 value to string.
Definition string.c:339
char * strcat(char *dest, const char *src)
Concatenate two strings.
Definition string.c:118
u16 intToHex(u32 value, char *str, u16 minsize)
Convert a u32 value to hexadecimal string.
Definition string.c:239
void fix16ToStr(fix16 value, char *str, u16 numdec)
Convert a fix16 value to string.
Definition string.c:281
void F16_toStr(fix16 value, char *str, u16 numdec)
Same as fix16ToStr(..)
Definition string.c:397
int sprintf(char *buffer, const char *fmt,...) __attribute__((format(printf
Composes a string with the same text that would be printed if format was used on printf,...
Definition string.c:709
void fix32ToStr(fix32 value, char *str, u16 numdec)
Convert a fix32 value to string.
Definition string.c:310
void FF32_toStr(fastfix32 value, char *str, u16 numdec)
Same as fastFix32ToStr(..)
Definition string.c:412
char * strreplacechar(char *str, char oldc, char newc)
Replace the given character in a string.
Definition string.c:146
void fastFix32ToStr(fastfix32 value, char *str, u16 numdec)
Convert a fastfix32 value to string.
Definition string.c:368
int vsprintf(char *buffer, const char *fmt, va_list args)
Composes a string with the same text that would be printed if format was used on printf,...
Definition string.c:443
void F32_toStr(fix32 value, char *str, u16 numdec)
Same as fix32ToStr(..)
Definition string.c:402
void FF16_toStr(fastfix16 value, char *str, u16 numdec)
Same as fastFix16ToStr(..)
Definition string.c:407
char * strncpy(char *dest, const char *src, u16 len)
Copies the first 'len' characters of string.
Definition string.c:86
char * strcpy(char *dest, const char *src)
Copies a string.
Definition string.c:76
u16 strnlen(const char *str, u16 maxlen)
Compute the length of a string, to a maximum number of bytes.
Definition string.c:52
int char * strclr(char *str)
Clear a string.
Definition string.c:139
u16 uintToStr(u32 value, char *str, u16 minsize)
Convert a u32 value to string (input value should be in [0..500000000] range).
Definition string.c:177
s8 strcmp(const char *str1, const char *str2)
Compare the 2 strings.
Definition string.c:62
u16 intToStr(s32 value, char *str, u16 minsize)
Convert a s32 value to string (input value should be in [-500000000..500000000] range).
Definition string.c:161
s16 fix16
Definition types.h:210
s32 fastfix32
Definition types.h:236
unsigned long u32
Definition types.h:105
char s8
Definition types.h:79
long s32
Definition types.h:89
s16 fastfix16
Definition types.h:231
unsigned short u16
Definition types.h:100
s32 fix32
Definition types.h:215