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 string to be set.
value Pointer to the value string to be set.
string Pointer to the location where the created key/value string is stored.
separator Character used to indicate the start of each of the strings in the key/value string.

Return Values

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

Description

Creates key and value strings.

The key/value string consists of a string specified by key and a string specified by value; to indicate the start of each string, the separator character is added for use as a symbol.

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

This is useful in the creation of save data for the data storage server. For more information about saving to the data storage server, see the DWC_SavePublicDataAsync and DWC_SavePrivateDataAsync functions.

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

To add more key/value strings to this 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

For the changelog prior to 5.1 PR2, click here.


CONFIDENTIAL