Files
FireBee_SVN/BaS_gcc/include/bas_string.h
Markus Fröschle 7535bb7333 fixed several off-by-one errors in string handling functions
loading and verifying .s19 files from basflash.s19 works!
2013-03-01 19:18:23 +00:00

27 lines
711 B
C

/*
* bas_string.h
*
* Created on: 26.02.2013
* Author: mfro
*/
#ifndef BAS_STRING_H_
#define BAS_STRING_H_
#include <stddef.h>
extern int strncmp(const char *s1, const char *s2, int max);
extern char *strcpy(char *dst, const char *src);
extern size_t strlen(const char *str);
extern char *strcat(char *dst, const char *src);
extern char *strncat(char *dst, const char *src, int max);
extern int atoi(const char *c);
#define isdigit(c) (((c) >= '0') && ((c) <= '9'))
#define isupper(c) ((c) >= 'A' && ((c) <= 'Z'))
#define islower(c) ((c) >= 'a' && ((c) <= 'z'))
#define isalpha(c) (isupper((c)) || islower(c))
#define tolower(c) (isupper(c) ? ((c) + 'a' - 'A') : (c))
#endif /* BAS_STRING_H_ */