32 #define APT_EMPTY_STRING ""
46 static APR_INLINE
void apt_string_reset(
apt_str_t *str)
53 static APR_INLINE
const char* apt_string_buffer_get(
const apt_str_t *str)
62 static APR_INLINE apr_size_t apt_string_length_get(
const apt_str_t *str)
68 static APR_INLINE apr_size_t apt_string_is_empty(
const apt_str_t *str)
70 return str->
length ? FALSE : TRUE;
78 static APR_INLINE
void apt_string_set(
apt_str_t *str,
const char *src)
80 str->
buf = (
char*)src;
81 str->
length = src ? strlen(src) : 0;
90 static APR_INLINE
void apt_string_assign(
apt_str_t *str,
const char *src, apr_pool_t *pool)
93 str->
length = src ? strlen(src) : 0;
95 str->
buf = apr_pstrmemdup(pool,src,str->
length);
105 static APR_INLINE
void apt_string_assign_n(
apt_str_t *str,
const char *src, apr_size_t length, apr_pool_t *pool)
110 str->
buf = apr_pstrmemdup(pool,src,str->
length);
120 static APR_INLINE
void apt_string_copy(
apt_str_t *str,
const apt_str_t *src_str, apr_pool_t *pool)
125 str->
buf = apr_pstrmemdup(pool,src_str->
buf,src_str->
length);
140 return (strncasecmp(str1->
buf,str2->
buf,str1->
length) == 0) ? TRUE : FALSE;
148 static APR_INLINE
void apt_string_to_iovec(
const apt_str_t *str,
struct iovec *vec)
150 vec->iov_base = str->
buf;
151 vec->iov_len = str->
length;