21 #ifndef __EDELIB_STRUTIL_H__
22 #define __EDELIB_STRUTIL_H__
41 EDELIB_API
char*
str_trim(
char* str);
46 EDELIB_API
unsigned char*
str_tolower(
unsigned char* str);
51 EDELIB_API
unsigned char*
str_toupper(
unsigned char* str);
60 EDELIB_API
bool str_ends(
const char* str,
const char* test);
69 EDELIB_API
unsigned int str_hash(
const char* str,
unsigned int len = 0);
85 template <
typename Container>
87 const String::size_type sz = str.
length();
88 String::size_type i = 0, j = 0;
91 while((i < sz) && (strchr(ws, str[i]) != NULL))
96 while((j < sz) && (strchr(ws, str[j]) == NULL))
99 c.push_back(str.
substr(i, j-i));
unsigned char * str_toupper(unsigned char *str)
char * str_trim(char *str)
unsigned int str_hash(const char *str, unsigned int len=0)
unsigned char * str_tolower(unsigned char *str)
char * str_trimleft(char *str)
size_type length(void) const
Definition: String.h:292
String substr(size_type index, size_type num=npos) const
A (relatively simple) string implementation.
Definition: String.h:82
char * str_trimright(char *str)
void stringtok(Container &c, const String &str, const char *ws=" \t\n")
Definition: StrUtil.h:86
bool str_ends(const char *str, const char *test)