105 return (
void *) s->
data;
146 #define STREQ_DISPATCH(type1, type2) \
147 if (s1->type == FSW_STRING_TYPE_##type1 && s2->type == FSW_STRING_TYPE_##type2) \
148 return fsw_streq_##type1##_##type2(s1->data, s2->data, s1->len); \
149 if (s2->type == FSW_STRING_TYPE_##type1 && s1->type == FSW_STRING_TYPE_##type2) \
150 return fsw_streq_##type1##_##type2(s2->data, s1->data, s1->len);
174 for (i = 0; s2[i]; i++)
179 temp_s.
data = (
char *)s2;
214 #define STRCOERCE_DISPATCH(type1, type2) \
215 if (src->type == FSW_STRING_TYPE_##type1 && type == FSW_STRING_TYPE_##type2) \
216 return fsw_strcoerce_##type1##_##type2(src->data, src->len, dest);
255 maxlen = buffer->
len;
262 for (i = 0; i < maxlen; i++, p++) {
263 if (*p == separator) {
264 buffer->
data = p + 1;
265 buffer->
len -= i + 1;
282 for (i = 0; i < maxlen; i++, p++) {
283 if (*p == separator) {
284 buffer->
data = p + 1;
285 buffer->
len -= i + 1;
@ FSW_STRING_TYPE_ISO88591
#define fsw_memcpy(dest, src, size)
#define fsw_memzero(dest, size)
#define fsw_alloc(size, ptrptr)
#define fsw_memeq(p1, p2, size)
#define STRCOERCE_DISPATCH(type1, type2)
void fsw_strfree(struct fsw_string *s)
int fsw_streq(struct fsw_string *s1, struct fsw_string *s2)
int fsw_strsize(struct fsw_string *s)
int fsw_streq_cstr(struct fsw_string *s1, const char *s2)
int fsw_strlen(struct fsw_string *s)
fsw_status_t fsw_strdup_coerce(struct fsw_string *dest, int type, struct fsw_string *src)
#define STREQ_DISPATCH(type1, type2)
fsw_status_t fsw_memdup(void **dest_out, void *src, int len)
void * fsw_strdata(struct fsw_string *s)
void fsw_strsplit(struct fsw_string *element, struct fsw_string *buffer, char separator)
fsw_status_t fsw_alloc_zero(int len, void **ptr_out)
void * data
Data pointer (may be NULL if type is EMPTY or len is zero)
int len
Length in characters.
int size
Total data size in bytes.
int type
Encoding of the string - empty, ISO-8859-1, UTF8, UTF16.