PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches
stringbuffer.c File Reference
#include "liblwgeom_internal.h"
#include "stringbuffer.h"
Include dependency graph for stringbuffer.c:

Go to the source code of this file.

Functions

stringbuffer_tstringbuffer_create (void)
 Allocate a new stringbuffer_t.
 
static void stringbuffer_init_with_size (stringbuffer_t *s, size_t size)
 
void stringbuffer_release (stringbuffer_t *s)
 
void stringbuffer_init (stringbuffer_t *s)
 
void stringbuffer_init_varlena (stringbuffer_t *s)
 
stringbuffer_tstringbuffer_create_with_size (size_t size)
 Allocate a new stringbuffer_t.
 
void stringbuffer_destroy (stringbuffer_t *s)
 Free the stringbuffer_t and all memory managed within it.
 
void stringbuffer_clear (stringbuffer_t *s)
 Reset the stringbuffer_t.
 
char stringbuffer_lastchar (stringbuffer_t *s)
 Return the last character in the buffer.
 
const char * stringbuffer_getstring (stringbuffer_t *s)
 Returns a reference to the internal string being managed by the stringbuffer.
 
char * stringbuffer_getstringcopy (stringbuffer_t *s)
 Returns a newly allocated string large enough to contain the current state of the string.
 
lwvarlena_tstringbuffer_getvarlena (stringbuffer_t *s)
 
lwvarlena_tstringbuffer_getvarlenacopy (stringbuffer_t *s)
 
int stringbuffer_getlength (stringbuffer_t *s)
 Returns the length of the current string, not including the null terminator (same behavior as strlen()).
 
void stringbuffer_set (stringbuffer_t *s, const char *str)
 Clear the stringbuffer_t and re-start it with the specified string.
 
void stringbuffer_copy (stringbuffer_t *dst, stringbuffer_t *src)
 Copy the contents of src into dst.
 
static int stringbuffer_avprintf (stringbuffer_t *s, const char *fmt, va_list ap) __attribute__((format(printf
 Appends a formatted string to the current string buffer, using the format and argument list provided.
 
int stringbuffer_aprintf (stringbuffer_t *s, const char *fmt,...)
 Appends a formatted string to the current string buffer, using the format and argument list provided.
 
int stringbuffer_trim_trailing_white (stringbuffer_t *s)
 Trims whitespace off the end of the stringbuffer.
 
int stringbuffer_trim_trailing_zeroes (stringbuffer_t *s)
 Trims zeroes off the end of the last number in the stringbuffer.