$darkmode
Elektra 0.11.0
|
Methods for Key name manipulation. More...
#include "kdbprivate.h"
#include <kdbassert.h>
#include <ctype.h>
#include "kdb.h"
#include "kdbhelper.h"
#include "kdbinternal.h"
Functions | |
const char * | keyName (const Key *key) |
Returns a pointer to the abbreviated real internal key name. More... | |
ssize_t | keyGetNameSize (const Key *key) |
Bytes needed to store the Key's name (excluding owner). More... | |
const void * | keyUnescapedName (const Key *key) |
Returns a Key's name, separated by NULL bytes and without backslashes for escaping. More... | |
ssize_t | keyGetUnescapedNameSize (const Key *key) |
Returns the size of the Key's unescaped name including embedded and terminating NULL characters. More... | |
ssize_t | keyGetName (const Key *key, char *returnedName, size_t maxSize) |
Get abbreviated Key name (excluding owner). More... | |
ssize_t | keyGetUnescapedName (const Key *key, char *returnedName, size_t maxSize) |
Copies the unescaped name of a Key into returnedName . More... | |
ssize_t | keySetName (Key *key, const char *newName) |
Set a new name to a Key. More... | |
ssize_t | keyAddName (Key *key, const char *newName) |
Add an already escaped name part to the Key's name. More... | |
int | keyReplacePrefix (Key *key, const Key *oldPrefix, const Key *newPrefix) |
Replaces a prefix of the key name of key . More... | |
bool | elektraKeyNameValidate (const char *name, bool isComplete) |
Takes an escaped key name and validates it. More... | |
void | elektraKeyNameCanonicalize (const char *name, char **canonicalName, size_t *canonicalSizePtr, size_t offset, size_t *usizePtr) |
Takes a valid (non-)canonical key name and produces its canonical form. More... | |
void | elektraKeyNameUnescape (const char *canonicalName, char *unescapedName) |
Takes a canonical key name and unescapes it. More... | |
const char * | keyBaseName (const Key *key) |
Returns a pointer to the unescaped Key's name where the basename starts. More... | |
ssize_t | keyGetBaseNameSize (const Key *key) |
Calculates number of bytes needed to store basename of key (including NULL terminator). More... | |
ssize_t | keyGetBaseName (const Key *key, char *returned, size_t maxSize) |
Copy the Key's basename to returned . More... | |
size_t | elektraKeyNameEscapePart (const char *part, char **escapedPart) |
Takes a single key name part and produces its escaped form. More... | |
ssize_t | keyAddBaseName (Key *key, const char *baseName) |
Adds baseName to the name of key . More... | |
ssize_t | keySetBaseName (Key *key, const char *baseName) |
Sets baseName as the new basename for key . More... | |
elektraNamespace | keyGetNamespace (const Key *key) |
Returns the elektraNamespace for a Key. More... | |
ssize_t | keySetNamespace (Key *key, elektraNamespace ns) |
Changes the namespace of a Key. More... | |
int | elektraIsArrayPart (const char *namePart) |
Checks if the given key name part is an array part. More... | |
Methods for Key name manipulation.