This section contains utilities relating to buffer management.
More...
|
| Buffer Object |
| A data buffer implementation. This implementation allows for dynamically creating a buffer and appending to it in a reasonably efficient matter. It is like String Object but is not NULL terminated. Functions of both may be used interchangeably.
|
|
|
typedef void * | ruBuffer |
| An opaque data type representing a regify-util string object that is not NULL terminated. More...
|
|
This section contains utilities relating to buffer management.
◆ ruBufferAppend
Append given data to Buffer Object.
- Parameters
-
rb | Data buffer to append data to. |
buf | data to append. |
len | Number of bytes of data to append. |
- Returns
- RUE_OK on success else a regify error code.
◆ ruBufferFree
Frees the given String Object object.
- Parameters
-
rb | String to free |
keep | Whether to also free the underlying char* buffer. |
◆ ruBufferGetData
Returns the underlying char* of the given Buffer Object.
- Parameters
-
rb | String buffer to return buffer of. |
- Returns
- Underlying char* or NULL in case rs was invalid.
◆ ruBufferLen
Returns the current length of the Buffer Object.
- Parameters
-
rb | Data buffer to return the length of. |
code | (Optional) Stores RUE_OK on success or regify error code. |
- Returns
- The length of the string or 0 in case of an error.
◆ ruBufferNew
◆ ruBuffer
An opaque data type representing a regify-util string object that is not NULL terminated.
◆ ruBufferAppendUriEncoded()
RUAPI int32_t ruBufferAppendUriEncoded |
( |
ruString |
rs, |
|
|
const char * |
buf, |
|
|
rusize |
len |
|
) |
| |
Append given string URI encoded to String Object.
- Parameters
-
rs | Data buffer to append data to. |
buf | Data to append. |
len | Number of bytes of data to append. |
- Returns
- RUE_OK on success else a regify error code.