DWC_SetCommonKeyValueString

Syntax

#include <dwc.h>

int DWC_SetCommonKeyValueString(const char *key,
                                const char *value,
                                char *string,
                                char separator);

Arguments

key Pointer to the "key" character string to be set.
value Pointer to the "value" character string to be set.
string Pointer to the location where the created key/value character string is stored.
separator Character used to indicate the start of each of the character strings in the key/value character string.

Return Values

Returns the length of the character string set in string (not including the NULL terminator).

Description

This function creates key/value character strings.

The key/value string consists of the string specified by key and the string specified by value with the separator character added as a symbol to indicate the start of each character string.

For example, specifying key="key1", value="value1", and separator='/', the character string "/key1/value1" is returned in string.

This is useful when creating the save data for the data storage server. See the functions DWC_SavePublicDataAsync and DWC_SavePrivateDataAsync for further information about saving to the data storage server.

A key/value character string with a maximum of 4096 characters (including the NULL terminator) can be created at any one time.

To add more key/value character strings to this character string, use the DWC_AddCommonKeyValueString function. Also, use the DWC_GetCommonValueString function to get the value string that corresponds to a specific key string from the key/value string.

Revision History


CONFIDENTIAL