Elektra
0.9.9
|
A key name is made out of a sequence of key part names, and can be constructed with keyAddBaseName/keySetBaseName
. Both applications and configuration file formats might need arbitrary strings to be encoded within a key name part.
For example:
keySetBaseName (key, keyBaseName (key))
should be a NOP, which is needed for round-trips: If a storage plugin serializes what it gets with keyBaseName
; keySetBaseName
must lead to the same key.keyAddBaseName/keySetBaseName
can accept: has the downside that applications would suddenly fail when trying to set some key base nameskeySetBaseName*
functions that make strings safe to be accepted in keyAddBaseName/keySetBaseName
: seems to be a too big change in the storage pluginskeyAddBaseName/keySetBaseName
never fail with any argument, so any character sequence can be escaped except of NULL bytes. The argument goes unmodified to the unescaped key name.
For arrays there is no escaping needed because an array is only an array if the metadata array
is appended to the direct parent key. See array.
keyAddBaseName/keySetBaseName
, without any size argumentkeyAddBaseName/keySetBaseName
without any further consideration