DWC_SetCommonKeyValueString

Syntax


#include <dwc.h>

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

Description

This function creates key and value character strings.

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, if you specify key as "key1", value as "value1", and separator as '/', the character string "/key1/value1" will be returned to string.

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.

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

To add more key/value character strings to this character string, use the DWC_AddCommonKeyValueString function. In addition, to get the value string that corresponds to a specific key string from the key/value string, use the DWC_GetCommonValueString function.

Arguments

key Pointer to the key character string to be set.
value Pointer to the value character string to be set.
string Pointer to the location where the created key/value character string is stored.
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 a character string that is set in the string (NULL terminator is not included).

See Also

DWC_AddCommonKeyValueString
DWC_GetCommonValueString
DWC_SavePublicDataAsync
DWC_SavePrivateDataAsync

Revision History

2005/12/16 Initial version.


CONFIDENTIAL