Subversion
Functions
svn_stringbuf_t functions
String handling

Functions

svn_stringbuf_tsvn_stringbuf_create (const char *cstring, apr_pool_t *pool)
 Create a new bytestring containing a C string (NULL-terminated).
svn_stringbuf_tsvn_stringbuf_ncreate (const char *bytes, apr_size_t size, apr_pool_t *pool)
 Create a new bytestring containing a generic string of bytes (NON-NULL-terminated)
svn_stringbuf_tsvn_stringbuf_create_ensure (apr_size_t minimum_size, apr_pool_t *pool)
 Create a new empty bytestring with at least minimum_size bytes of space available in the memory block.
svn_stringbuf_tsvn_stringbuf_create_from_string (const svn_string_t *str, apr_pool_t *pool)
 Create a new stringbuf with the contents of the given string.
svn_stringbuf_tsvn_stringbuf_createf (apr_pool_t *pool, const char *fmt,...)
 Create a new bytestring by formatting cstring (NULL-terminated) from varargs, which are as appropriate for apr_psprintf().
svn_stringbuf_tsvn_stringbuf_createv (apr_pool_t *pool, const char *fmt, va_list ap)
 Create a new bytestring by formatting cstring (NULL-terminated) from a va_list (see svn_stringbuf_createf()).
void svn_stringbuf_ensure (svn_stringbuf_t *str, apr_size_t minimum_size)
 Make sure that the string str has at least minimum_size bytes of space available in the memory block.
void svn_stringbuf_set (svn_stringbuf_t *str, const char *value)
 Set a bytestring str to value.
void svn_stringbuf_setempty (svn_stringbuf_t *str)
 Set a bytestring str to empty (0 length).
svn_boolean_t svn_stringbuf_isempty (const svn_stringbuf_t *str)
 Return TRUE if a bytestring is empty (has length zero).
void svn_stringbuf_chop (svn_stringbuf_t *str, apr_size_t nbytes)
 Chop nbytes bytes off end of str, but not more than str->len.
void svn_stringbuf_fillchar (svn_stringbuf_t *str, unsigned char c)
 Fill bytestring str with character c.
void svn_stringbuf_appendbyte (svn_stringbuf_t *targetstr, char byte)
 Append a single character byte onto targetstr.
void svn_stringbuf_appendbytes (svn_stringbuf_t *targetstr, const char *bytes, apr_size_t count)
 Append an array of bytes onto targetstr.
void svn_stringbuf_appendstr (svn_stringbuf_t *targetstr, const svn_stringbuf_t *appendstr)
 Append an svn_stringbuf_t onto targetstr.
void svn_stringbuf_appendcstr (svn_stringbuf_t *targetstr, const char *cstr)
 Append a C string onto targetstr.
svn_stringbuf_tsvn_stringbuf_dup (const svn_stringbuf_t *original_string, apr_pool_t *pool)
 Return a duplicate of original_string.
svn_boolean_t svn_stringbuf_compare (const svn_stringbuf_t *str1, const svn_stringbuf_t *str2)
 Return TRUE iff str1 and str2 have identical length and data.
apr_size_t svn_stringbuf_first_non_whitespace (const svn_stringbuf_t *str)
 Return offset of first non-whitespace character in str, or return str->len if none.
void svn_stringbuf_strip_whitespace (svn_stringbuf_t *str)
 Strip whitespace from both sides of str (modified in place).
apr_size_t svn_stringbuf_find_char_backward (const svn_stringbuf_t *str, char ch)
 Return position of last occurrence of ch in str, or return str->len if no occurrence.
svn_boolean_t svn_string_compare_stringbuf (const svn_string_t *str1, const svn_stringbuf_t *str2)
 Return TRUE iff str1 and str2 have identical length and data.

Function Documentation

svn_boolean_t svn_string_compare_stringbuf ( const svn_string_t str1,
const svn_stringbuf_t str2 
)

Return TRUE iff str1 and str2 have identical length and data.

void svn_stringbuf_appendbyte ( svn_stringbuf_t targetstr,
char  byte 
)

Append a single character byte onto targetstr.

This is an optimized version of svn_stringbuf_appendbytes() that is much faster to call and execute. Gains vary with the ABI. The advantages extend beyond the actual call because the reduced register pressure allows for more optimization within the caller.

reallocs if necessary. targetstr is affected, nothing else is.

Since:
New in 1.7.
void svn_stringbuf_appendbytes ( svn_stringbuf_t targetstr,
const char *  bytes,
apr_size_t  count 
)

Append an array of bytes onto targetstr.

reallocs if necessary. targetstr is affected, nothing else is.

void svn_stringbuf_appendcstr ( svn_stringbuf_t targetstr,
const char *  cstr 
)

Append a C string onto targetstr.

reallocs if necessary. targetstr is affected, nothing else is.

void svn_stringbuf_appendstr ( svn_stringbuf_t targetstr,
const svn_stringbuf_t appendstr 
)

Append an svn_stringbuf_t onto targetstr.

reallocs if necessary. targetstr is affected, nothing else is.

void svn_stringbuf_chop ( svn_stringbuf_t str,
apr_size_t  nbytes 
)

Chop nbytes bytes off end of str, but not more than str->len.

svn_boolean_t svn_stringbuf_compare ( const svn_stringbuf_t str1,
const svn_stringbuf_t str2 
)

Return TRUE iff str1 and str2 have identical length and data.

svn_stringbuf_t* svn_stringbuf_create ( const char *  cstring,
apr_pool_t *  pool 
)

Create a new bytestring containing a C string (NULL-terminated).

svn_stringbuf_t* svn_stringbuf_create_ensure ( apr_size_t  minimum_size,
apr_pool_t *  pool 
)

Create a new empty bytestring with at least minimum_size bytes of space available in the memory block.

The allocated string buffer will be one byte larger than minimum_size to account for a final '\0'.

Since:
New in 1.6.
svn_stringbuf_t* svn_stringbuf_dup ( const svn_stringbuf_t original_string,
apr_pool_t *  pool 
)

Return a duplicate of original_string.

void svn_stringbuf_ensure ( svn_stringbuf_t str,
apr_size_t  minimum_size 
)

Make sure that the string str has at least minimum_size bytes of space available in the memory block.

(minimum_size should include space for the terminating NULL character.)

void svn_stringbuf_fillchar ( svn_stringbuf_t str,
unsigned char  c 
)

Fill bytestring str with character c.

svn_boolean_t svn_stringbuf_isempty ( const svn_stringbuf_t str)

Return TRUE if a bytestring is empty (has length zero).

void svn_stringbuf_setempty ( svn_stringbuf_t str)

Set a bytestring str to empty (0 length).

void svn_stringbuf_strip_whitespace ( svn_stringbuf_t str)

Strip whitespace from both sides of str (modified in place).

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines