DWC_GetCommonValueString

C Specification


#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 strings specified with string.

The key/value string is a string consisting 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 the character strings.

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 when creating the save data for the data storage server. See the functions DWC_SavePublicDataAsync and DWC_SavePrivateDataAsync for further information about the data storage server.

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

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 strings.
separator A 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 'value' (not including the NULL end-of-string character). If a non-existent key is specified, -1 is returned.

See Also

DWC_SetCommonKeyValueString, DWC_AddCommonKeyValueString, DWC_SavePublicDataAsync, DWC_SavePrivateDataAsync

Revision History

12/16/2005 Initial version.