#ifndef _CFSTRING_H_
#define _CFSTRING_H_

#ifdef __cplusplus
extern "C" {
#endif

// copy max n-1 chars append '\0'
char *strncpyf(char *dest, const char *src, int n);
// trim blank chars from left
char *strltrimf(char *str);
// trim blank chars from right;
char *strrtrimf(char *str);
// trim blank chars;
char *strtrimf(char *str);
// converts sring to uppercase
char *strupperf(char *str);
// converts sring to lowercase
char *strlowerf(char *str);

// check if pattern is start sequence of str;
// return the length of the pattern or -1
int strmatchf(char *str, char *pattern);
// gets signed inteeger from str and write it to intval
// gets max 10 digits
// returns number of eaten chars
int strgetintf(const char *str, int *intval);

#ifdef __cplusplus
}
#endif

#endif
