30 #define APT_EMPTY_STRING ""
44 static APR_INLINE
void apt_string_reset(
apt_str_t *str)
51 static APR_INLINE
const char* apt_string_buffer_get(
const apt_str_t *str)
60 static APR_INLINE apr_size_t apt_string_length_get(
const apt_str_t *str)
66 static APR_INLINE apr_size_t apt_string_is_empty(
const apt_str_t *str)
68 return str->
length ? FALSE : TRUE;
76 static APR_INLINE
void apt_string_set(
apt_str_t *str,
const char *src)
78 str->
buf = (
char*)src;
79 str->
length = src ? strlen(src) : 0;
88 static APR_INLINE
void apt_string_assign(
apt_str_t *str,
const char *src, apr_pool_t *pool)
91 str->
length = src ? strlen(src) : 0;
93 str->
buf = apr_pstrmemdup(pool,src,str->
length);
103 static APR_INLINE
void apt_string_assign_n(
apt_str_t *str,
const char *src, apr_size_t length, apr_pool_t *pool)
108 str->
buf = apr_pstrmemdup(pool,src,str->
length);
118 static APR_INLINE
void apt_string_copy(
apt_str_t *str,
const apt_str_t *src_str, apr_pool_t *pool)
123 str->
buf = apr_pstrmemdup(pool,src_str->
buf,src_str->
length);
138 return (strncasecmp(str1->
buf,str2->
buf,str1->
length) == 0) ? TRUE : FALSE;
155 return (strncasecmp(str1->
buf,str2->
buf,str1->
length) == 0) ? TRUE : FALSE;
163 static APR_INLINE
void apt_string_to_iovec(
const apt_str_t *str,
struct iovec *vec)
165 vec->iov_base = str->
buf;
166 vec->iov_len = str->
length;
#define APT_END_EXTERN_C
Definition: apt.h:38
int apt_bool_t
Definition: apt.h:57
apr_size_t length
Definition: apt_string.h:40
#define APT_BEGIN_EXTERN_C
Definition: apt.h:36
#define APT_EMPTY_STRING
Definition: apt_string.h:30
Definition: apt_string.h:36
char * buf
Definition: apt_string.h:38