table of contents
| array.c(3elektra) | Elektra | array.c(3elektra) |
NAME¶
array.c - Array methods.
SYNOPSIS¶
#include <kdb.h>
#include <kdbease.h>
#include <kdbhelper.h>
#include <kdbtypes.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Functions¶
int elektraArrayIncName (Key *key)
Increment the name of the key by one. KeySet * elektraArrayGet (const
Key *arrayParent, KeySet *keys)
Return all the array keys below the given array parent. Key *
elektraArrayGetNextKey (KeySet *arrayKeys)
Return the next key in the given array.
Detailed Description¶
Array methods.
Copyright:
Function Documentation¶
KeySet* elektraArrayGet (const Key * arrayParent, KeySet * keys)¶
Return all the array keys below the given array parent. The array parent itself is not returned. For example, if user/config/# is an array, user/config is the array parent. Only the direct array keys will be returned. This means that for example user/config/#1/key will not be included, but only user/config/#1.
A new keyset will be allocated for the resulting keys. This means that the caller must ksDel the resulting keyset.
Parameters:
keys the keyset containing the array keys
Returns:
Return values:
Key* elektraArrayGetNextKey (KeySet * arrayKeys)¶
Return the next key in the given array. The function will automatically allocate memory for a new key and name it accordingly.
Precondition:
The caller has to keyDel the resulting key.
Parameters:
Returns:
Return values:
NULL on NULL pointers or if an error occurs
int elektraArrayIncName (Key * key)¶
Increment the name of the key by one. Alphabetical order will remain
e.g. user/abc/#9 will be changed to user/abc/#_10
For the start: user/abc/# will be changed to user/abc/#0
Parameters:
Return values:
0 on success
Author¶
Generated automatically by Doxygen for Elektra from the source code.
| Mon Jan 15 2018 | Version 0.8.20 |