|
ssize_t | elektraMemcpy (Key **array1, Key **array2, size_t size) |
| Internal Methods for Elektra. More...
|
|
ssize_t | elektraMemmove (Key **array1, Key **array2, size_t size) |
| Copies the key array2 into where array1 points. More...
|
|
int | elektraStrCmp (const char *s1, const char *s2) |
| Compare Strings. More...
|
|
int | elektraStrNCmp (const char *s1, const char *s2, size_t n) |
| Compare Strings up to a maximum length. More...
|
|
int | elektraStrCaseCmp (const char *s1, const char *s2) |
| Compare Strings ignoring case. More...
|
|
int | elektraStrNCaseCmp (const char *s1, const char *s2, size_t n) |
| Compare Strings ignoring case up to a maximum length. More...
|
|
int | elektraMemCaseCmp (const char *s1, const char *s2, size_t size) |
| Compare two memory regions but make cmp chars uppercase before comparison. More...
|
|
int | elektraRealloc (void **buffer, size_t size) |
| Reallocate Storage in a save way. More...
|
|
void * | elektraMalloc (size_t size) |
| Allocate memory for Elektra. More...
|
|
void * | elektraCalloc (size_t size) |
| Allocate memory for Elektra. More...
|
|
void | elektraFree (void *ptr) |
| Free memory of Elektra or its backends. More...
|
|
char * | elektraStrDup (const char *s) |
| Copy string into new allocated memory. More...
|
|
void * | elektraMemDup (const void *s, size_t n) |
| Copy buffer into new allocated memory. More...
|
|
size_t | elektraStrLen (const char *s) |
| Calculates the length in bytes of a string. More...
|
|
char * | elektraFormat (const char *format,...) |
| Does string formatting in fresh allocated memory. More...
|
|
char * | elektraVFormat (const char *format, va_list arg_list) |
| Does string formatting in fresh allocated memory. More...
|
|
Internal methods for Elektra.
- Copyright
- BSD License (see LICENSE.md or https://www.libelektra.org)
ssize_t elektraMemcpy |
( |
Key ** |
array1, |
|
|
Key ** |
array2, |
|
|
size_t |
size |
|
) |
| |
Internal Methods for Elektra.
To use them:
Includes most internal header files.
There are some areas where libraries have to reimplement some basic functions to archive support for non-standard systems, for testing purposes or to provide a little more convenience. Copies the key array2 into where array1 points. It copies size elements.
Overlapping is prohibited, use elektraMemmove() instead.
- Parameters
-
array1 | the destination |
array2 | the source |
size | how many pointer to Keys to copy |
- Return values
-
-1 | on null pointers |
0 | if nothing was done |
- Returns
- size how many keys were copied
size_t elektraStrLen |
( |
const char * |
s | ) |
|
Calculates the length in bytes of a string.
This function differs from strlen() because it is Unicode and multibyte chars safe. While strlen() counts characters and ignores the final NULL, elektraStrLen() count bytes including the ending NULL.
It must not be used to search for / in the name, because it does not consider escaping. Instead use the unescaped name.
- See also
- keyUnescapedName()
- Parameters
-
s | the string to get the length from |
- Returns
- number of bytes used by the string, including the final NULL.