DWC_GetCommonValueString

Syntax


#include <dwc.h>

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

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 a string specified by key and a string specified by value; to indicate the start of each character string, the separator character is added for use as a symbol.

For example, when calling this function by specifying string = "/key1/value1/key2/value2", key = "key1", and separator = '/', the character string "value1" is returned to value.

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

To create a key or value character string, use the DWC_SetCommonKeyValueString or DWC_AddCommonKeyValueString function.

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.

See Also

DWC_SetCommonKeyValueString
DWC_AddCommonKeyValueString
DWC_SavePublicDataAsync
DWC_SavePrivateDataAsync

Revision History

2005/12/16 Initial version.


CONFIDENTIAL