.TH "conversion.c" 3elektra "Fri Aug 4 2023" "Version 0.11.0" "Elektra" \" -*- nroff -*-
.ad l
.nh
.SH NAME
conversion.c \- Elektra High Level API\&.  

.SH SYNOPSIS
.br
.PP
\fC#include 'kdbease\&.h'\fP
.br
\fC#include 'kdbhelper\&.h'\fP
.br
\fC#include <ctype\&.h>\fP
.br
\fC#include <errno\&.h>\fP
.br
\fC#include <stdint\&.h>\fP
.br
\fC#include <stdlib\&.h>\fP
.br
\fC#include <string\&.h>\fP
.br
\fC#include 'macros/type_create_to_value\&.h'\fP
.br

.SS "Functions"

.in +1c
.ti -1c
.RI "int \fBelektraKeyToString\fP (const Key *key, const char **variable)"
.br
.RI "Converts a Key to string\&. "
.ti -1c
.RI "int \fBelektraKeyToBoolean\fP (const Key *key, kdb_boolean_t *variable)"
.br
.RI "Converts a Key to boolean\&. "
.ti -1c
.RI "int \fBelektraKeyToChar\fP (const Key *key, kdb_char_t *variable)"
.br
.RI "Converts a Key to char\&. "
.ti -1c
.RI "int \fBelektraKeyToOctet\fP (const Key *key, kdb_octet_t *variable)"
.br
.RI "Converts a Key to octet\&. "
.ti -1c
.RI "int \fBelektraKeyToShort\fP (const Key *key, kdb_short_t *variable)"
.br
.RI "Converts a Key to short\&. "
.ti -1c
.RI "int \fBelektraKeyToUnsignedShort\fP (const Key *key, kdb_unsigned_short_t *variable)"
.br
.RI "Converts a Key to unsigned_short\&. "
.ti -1c
.RI "int \fBelektraKeyToLong\fP (const Key *key, kdb_long_t *variable)"
.br
.RI "Converts a Key to long\&. "
.ti -1c
.RI "int \fBelektraKeyToUnsignedLong\fP (const Key *key, kdb_unsigned_long_t *variable)"
.br
.RI "Converts a Key to unsigned_long\&. "
.ti -1c
.RI "int \fBelektraKeyToLongLong\fP (const Key *key, kdb_long_long_t *variable)"
.br
.RI "Converts a Key to long_long\&. "
.ti -1c
.RI "int \fBelektraKeyToUnsignedLongLong\fP (const Key *key, kdb_unsigned_long_long_t *variable)"
.br
.RI "Converts a Key to unsigned_long_long\&. "
.ti -1c
.RI "int \fBelektraKeyToFloat\fP (const Key *key, kdb_float_t *variable)"
.br
.RI "Converts a Key to float\&. "
.ti -1c
.RI "int \fBelektraKeyToDouble\fP (const Key *key, kdb_double_t *variable)"
.br
.RI "Converts a Key to double\&. "
.ti -1c
.RI "char * \fBelektraBooleanToString\fP (kdb_boolean_t value)"
.br
.RI "Converts a boolean to string\&. "
.ti -1c
.RI "char * \fBelektraCharToString\fP (kdb_char_t value)"
.br
.RI "Converts a char to string\&. "
.ti -1c
.RI "char * \fBelektraOctetToString\fP (kdb_octet_t value)"
.br
.RI "Converts an octet to string\&. "
.ti -1c
.RI "char * \fBelektraShortToString\fP (kdb_short_t value)"
.br
.RI "Converts a short to string\&. "
.ti -1c
.RI "char * \fBelektraUnsignedShortToString\fP (kdb_unsigned_short_t value)"
.br
.RI "Converts an unsigned short to string\&. "
.ti -1c
.RI "char * \fBelektraLongToString\fP (kdb_long_t value)"
.br
.RI "Converts a long to string\&. "
.ti -1c
.RI "char * \fBelektraUnsignedLongToString\fP (kdb_unsigned_long_t value)"
.br
.RI "Converts an unsigned long to string\&. "
.ti -1c
.RI "char * \fBelektraLongLongToString\fP (kdb_long_long_t value)"
.br
.RI "Converts a long long to string\&. "
.ti -1c
.RI "char * \fBelektraUnsignedLongLongToString\fP (kdb_unsigned_long_long_t value)"
.br
.RI "Converts an unsigned long long to string\&. "
.ti -1c
.RI "char * \fBelektraFloatToString\fP (kdb_float_t value)"
.br
.RI "Converts a float to string\&. "
.ti -1c
.RI "char * \fBelektraDoubleToString\fP (kdb_double_t value)"
.br
.RI "Converts a double to string\&. "
.in -1c
.SH "Detailed Description"
.PP 
Elektra High Level API\&. 


.PP
\fBCopyright\fP
.RS 4
BSD License (see doc/LICENSE\&.md or http://www.libelektra.org) 
.RE
.PP

.SH "Function Documentation"
.PP 
.SS "char* elektraBooleanToString (kdb_boolean_t value)"

.PP
Converts a boolean to string\&. The string is allocated with \fBelektraMalloc()\fP and must be disposed of with \fBelektraFree()\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIvalue\fP the boolean to convert 
.RE
.PP
\fBReturns\fP
.RS 4
a new string allocated with elektraMalloc, or 0 on error 
.RE
.PP

.SS "char* elektraCharToString (kdb_char_t value)"

.PP
Converts a char to string\&. The string is allocated with \fBelektraMalloc()\fP and must be disposed of with \fBelektraFree()\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIvalue\fP the value to convert 
.RE
.PP
\fBReturns\fP
.RS 4
a new string allocated with elektraMalloc, or 0 on error 
.RE
.PP

.SS "char* elektraDoubleToString (kdb_double_t value)"

.PP
Converts a double to string\&. The string is allocated with \fBelektraMalloc()\fP and must be disposed of with \fBelektraFree()\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIvalue\fP the value to convert 
.RE
.PP
\fBReturns\fP
.RS 4
a new string allocated with elektraMalloc, or 0 on error 
.RE
.PP

.SS "char* elektraFloatToString (kdb_float_t value)"

.PP
Converts a float to string\&. The string is allocated with \fBelektraMalloc()\fP and must be disposed of with \fBelektraFree()\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIvalue\fP the value to convert 
.RE
.PP
\fBReturns\fP
.RS 4
a new string allocated with elektraMalloc, or 0 on error 
.RE
.PP

.SS "int elektraKeyToBoolean (const Key * key, kdb_boolean_t * variable)"

.PP
Converts a Key to boolean\&. The value '1' is regarded as true, anything is as false\&.
.PP
The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "int elektraKeyToChar (const Key * key, kdb_char_t * variable)"

.PP
Converts a Key to char\&. The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "int elektraKeyToDouble (const Key * key, kdb_double_t * variable)"

.PP
Converts a Key to double\&. The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "int elektraKeyToFloat (const Key * key, kdb_float_t * variable)"

.PP
Converts a Key to float\&. The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "int elektraKeyToLong (const Key * key, kdb_long_t * variable)"

.PP
Converts a Key to long\&. The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "int elektraKeyToLongLong (const Key * key, kdb_long_long_t * variable)"

.PP
Converts a Key to long_long\&. The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "int elektraKeyToOctet (const Key * key, kdb_octet_t * variable)"

.PP
Converts a Key to octet\&. The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "int elektraKeyToShort (const Key * key, kdb_short_t * variable)"

.PP
Converts a Key to short\&. The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "int elektraKeyToString (const Key * key, const char ** variable)"

.PP
Converts a Key to string\&. The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "int elektraKeyToUnsignedLong (const Key * key, kdb_unsigned_long_t * variable)"

.PP
Converts a Key to unsigned_long\&. The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "int elektraKeyToUnsignedLongLong (const Key * key, kdb_unsigned_long_long_t * variable)"

.PP
Converts a Key to unsigned_long_long\&. The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "int elektraKeyToUnsignedShort (const Key * key, kdb_unsigned_short_t * variable)"

.PP
Converts a Key to unsigned_short\&. The variable pointed to by \fCvariable\fP is unchanged, if an error occurs\&.
.PP
\fBParameters\fP
.RS 4
\fIkey\fP the key to convert 
.br
\fIvariable\fP pointer to the output variable 
.RE
.PP
\fBReturn values\fP
.RS 4
\fI1\fP on success 
.br
\fI0\fP otherwise 
.RE
.PP

.SS "char* elektraLongLongToString (kdb_long_long_t value)"

.PP
Converts a long long to string\&. The string is allocated with \fBelektraMalloc()\fP and must be disposed of with \fBelektraFree()\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIvalue\fP the value to convert 
.RE
.PP
\fBReturns\fP
.RS 4
a new string allocated with elektraMalloc, or 0 on error 
.RE
.PP

.SS "char* elektraLongToString (kdb_long_t value)"

.PP
Converts a long to string\&. The string is allocated with \fBelektraMalloc()\fP and must be disposed of with \fBelektraFree()\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIvalue\fP the value to convert 
.RE
.PP
\fBReturns\fP
.RS 4
a new string allocated with elektraMalloc, or 0 on error 
.RE
.PP

.SS "char* elektraOctetToString (kdb_octet_t value)"

.PP
Converts an octet to string\&. The string is allocated with \fBelektraMalloc()\fP and must be disposed of with \fBelektraFree()\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIvalue\fP the value to convert 
.RE
.PP
\fBReturns\fP
.RS 4
a new string allocated with elektraMalloc, or 0 on error 
.RE
.PP

.SS "char* elektraShortToString (kdb_short_t value)"

.PP
Converts a short to string\&. The string is allocated with \fBelektraMalloc()\fP and must be disposed of with \fBelektraFree()\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIvalue\fP the value to convert 
.RE
.PP
\fBReturns\fP
.RS 4
a new string allocated with elektraMalloc, or 0 on error 
.RE
.PP

.SS "char* elektraUnsignedLongLongToString (kdb_unsigned_long_long_t value)"

.PP
Converts an unsigned long long to string\&. The string is allocated with \fBelektraMalloc()\fP and must be disposed of with \fBelektraFree()\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIvalue\fP the value to convert 
.RE
.PP
\fBReturns\fP
.RS 4
a new string allocated with elektraMalloc, or 0 on error 
.RE
.PP

.SS "char* elektraUnsignedLongToString (kdb_unsigned_long_t value)"

.PP
Converts an unsigned long to string\&. The string is allocated with \fBelektraMalloc()\fP and must be disposed of with \fBelektraFree()\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIvalue\fP the value to convert 
.RE
.PP
\fBReturns\fP
.RS 4
a new string allocated with elektraMalloc, or 0 on error 
.RE
.PP

.SS "char* elektraUnsignedShortToString (kdb_unsigned_short_t value)"

.PP
Converts an unsigned short to string\&. The string is allocated with \fBelektraMalloc()\fP and must be disposed of with \fBelektraFree()\fP\&.
.PP
\fBParameters\fP
.RS 4
\fIvalue\fP the value to convert 
.RE
.PP
\fBReturns\fP
.RS 4
a new string allocated with elektraMalloc, or 0 on error 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for Elektra from the source code\&.
