/* * str.h * * Created on: 11 oct. 2011 * Author: laurent */ #ifndef STR_H_ #define STR_H_ #include #include typedef struct { char *c_str; uint32_t length; uint32_t memorySize; } str; str * strNew (); str * strNewCopy (const str *s); str * strNewChar (const char *data); str * strNewPrintf (const char *fmt, ... ); str * strNewSubStr (const str *s, int32_t start, int32_t end); void strSet (str *s, const char *data); void strSetBin (str *s, const char *data, uint32_t length); void strConcatChar (str *s, const char *concat); void strConcatStr (str *s, const str *concat); void strConcatBin (str *s, const char *concat, uint32_t length); void strConcatPrintf(str *s, const char *fmt, ... ); int32_t strFindChar (str *s, char t); int32_t strFindStr (const str *s, const char *t); void strTrim (str *s); void strToLower (str *s); void strToUpper (str *s); void strFree (str *s); #endif /* STR_H_ */