DWC_AddCommonKeyValueString

Syntax

#include <dwc.h>
int DWC_AddCommonKeyValueString(const char *key,
                                const char *value,
                                char *string,
                                char separator);

Arguments

key Pointer to the key string to add.
value Pointer to the value string to add.
string Pointer to the string to which the key/value string is to be added.
separator Character used to indicate the start of each of the strings in the key/value string.

Return Values

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

Description

Adds a key/value string to the end of a string.

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, if this function is called specifying string="/key1/value1", key="key2", value="value2", and separator='/', the string "/key1/value1/key2/value2" will be 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 added at one time.

Use the DWC_SetCommonKeyValueString function when creating a key/value string. 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