DWC_GetCommonValueString

Syntax

#include <dwc.h>

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

Arguments

key Pointer to the key string corresponding to the value string you want to get.
value Pointer to the storage destination of the value string you want to get.
string Pointer to the key/value string.
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 in value (not including the NULL terminator). If a non-existent key is specified, -1 is returned.

Description

Gets the value string corresponding to the string specified with key from the key/value string specified with string.

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, when calling this function and specifying string="/key1/value1/key2/value2", key="key1", and separator='/', the character string "value1" is returned to value.

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.

Use the DWC_SetCommonKeyValueString / DWC_AddCommonKeyValueString functions to create a key/value character string.

Revision History


CONFIDENTIAL