LibJuno 0.1.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
|
#include "juno/macros.h"
#include "juno/memory/memory.h"
#include "juno/memory/memory_types.h"
#include "juno/string/string_api.h"
#include "juno/status.h"
#include "juno/string/string.h"
#include <stddef.h>
#include <stdint.h>
Functions | |
JUNO_STATUS_T | Juno_StringInit (JUNO_STRING_T *ptString, JUNO_MEMORY_ALLOC_T *ptAlloc, const char *pcStr, size_t zLen, JUNO_FAILURE_HANDLER_T pfcnFailureHandler, JUNO_USER_DATA_T *pvUserData) |
Creates a JUNO string from a C string. | |
JUNO_STATUS_T | Juno_StringSetAlloc (JUNO_STRING_T *ptString, JUNO_MEMORY_ALLOC_T *ptAlloc) |
Sets a new memory allocator for a JUNO string. | |
JUNO_STATUS_T | Juno_StringLength (JUNO_STRING_T *ptString, size_t *pzRetSize) |
Retrieves the size of the JUNO string. | |
JUNO_STATUS_T | Juno_StringAppend (JUNO_STRING_T *ptString, const char *pcCstr, size_t zLen) |
JUNO_STATUS_T | Juno_StringConcat (JUNO_STRING_T *ptString1, JUNO_STRING_T *ptString2) |
Concatenates two JUNO strings. | |
JUNO_STATUS_T | Juno_StringFree (JUNO_STRING_T *ptString) |
Frees resources associated with the JUNO string. | |
const JUNO_STRING_API_T * | Juno_StringApi (void) |
const JUNO_STRING_API_T * Juno_StringApi | ( | void | ) |
JUNO_STATUS_T Juno_StringAppend | ( | JUNO_STRING_T * | ptString, |
const char * | pcCstr, | ||
size_t | zLen | ||
) |
Writes a C-String to the Juno String
ptString | The juno string to write to |
pcCstr | The C string |
zLen | The length of the C string |
JUNO_STATUS_T Juno_StringConcat | ( | JUNO_STRING_T * | ptString1, |
JUNO_STRING_T * | ptString2 | ||
) |
Concatenates two JUNO strings.
ptString1 | Pointer to the first string. |
ptString2 | Pointer to the second string. |
JUNO_STATUS_T Juno_StringFree | ( | JUNO_STRING_T * | ptString | ) |
Frees resources associated with the JUNO string.
ptString | Pointer to the JUNO string structure. |
JUNO_STATUS_T Juno_StringInit | ( | JUNO_STRING_T * | ptString, |
JUNO_MEMORY_ALLOC_T * | ptAlloc, | ||
const char * | pcStr, | ||
size_t | zLen, | ||
JUNO_FAILURE_HANDLER_T | pfcnFailureHandler, | ||
JUNO_USER_DATA_T * | pvUserData | ||
) |
Creates a JUNO string from a C string.
ptString | Pointer to the JUNO string structure. |
ptAlloc | Memory allocator. |
pcStr | C-string input. |
zLen | Length of the input string. |
pfcnFailureHandler | Failure handler callback. |
pvUserData | User data pointer. |
JUNO_STATUS_T Juno_StringLength | ( | JUNO_STRING_T * | ptString, |
size_t * | pzRetSize | ||
) |
Retrieves the size of the JUNO string.
ptString | Pointer to the JUNO string structure. |
pzRetSize | Pointer to variable to store the string size. |
JUNO_STATUS_T Juno_StringSetAlloc | ( | JUNO_STRING_T * | ptString, |
JUNO_MEMORY_ALLOC_T * | ptAlloc | ||
) |
Sets a new memory allocator for a JUNO string.
ptString | Pointer to the JUNO string structure. |
ptAlloc | New memory allocator. |