1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html> 3 4<head> 5<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 8<title>DWC_SetCommonKeyValueString</title> 9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 10</head> 11 12<body> 13<a name="dwc__common_8h_15da1248b53189ca3688011a533236f75"></a> 14<h1 align="left">DWC_SetCommonKeyValueString</h1> 15<h2>Syntax</h2> 16 17<dl> 18 <dd> 19<CODE>#include <dwc.h></CODE><BR> 20 <BR> 21 <PRE><CODE>int <a href=DWC_SetCommonKeyValueString.html#dwc__common_8h_15da1248b53189ca3688011a533236f75>DWC_SetCommonKeyValueString</a>(const char *key, 22 const char *value, 23 char *string, 24 char separator);</CODE></PRE></dd> 25</dl> 26 27<h2>Arguments</h2> 28 29<TABLE border="1" width="100%"> 30 <TBODY> 31 32 <TR> 33<TD width="13%"><EM><STRONG>key</STRONG></EM></TD> 34<TD width="87%">Pointer to the "key" character string to be set.</TD> 35 </TR> 36 37 <TR> 38<TD width="13%"><EM><STRONG>value</STRONG></EM></TD> 39<TD width="87%">Pointer to the "value" character string to be set.</TD> 40 </TR> 41 42 <TR> 43<TD width="13%"><EM><STRONG>string</STRONG></EM></TD> 44<TD width="87%">Pointer to the location where the created key/value character string is stored.</TD> 45 </TR> 46 47 <TR> 48<TD width="13%"><EM><STRONG>separator</STRONG></EM></TD> 49<TD width="87%">Character used to indicate the start of each of the character strings in the key/value character string.</TD> 50 </TR> 51 52 </TBODY> 53</TABLE> 54 55<h2>Return Values</h2> 56 57<p>Returns the length of the character string set in <CODE>string</CODE> (not including the NULL terminator).</p> 58 59<H2>Description</H2> 60<p>This function creates key/value character strings.</p><p>The key/value string consists of the string specified by <CODE>key</CODE> and the string specified by <CODE>value</CODE> with the <CODE>separator</CODE> character added as a symbol to indicate the start of each character string.</p><p>For example, specifying <CODE>key="key1"</CODE>, <CODE>value="value1"</CODE>, and <CODE>separator='/'</CODE>, the character string <CODE>"/key1/value1"</CODE> is returned in <CODE>string</CODE>.</p><p>This is useful when creating the save data for the data storage server. See the functions <a href=DWC_SavePublicDataAsync.html#dwc__datastorage_8h_172b3cdde2638884709ae0c6c5ab68ba7><CODE>DWC_SavePublicDataAsync</CODE></a> and <a href=DWC_SavePrivateDataAsync.html#dwc__datastorage_8h_1982adb8b9c1f01095b7acf2496f3390a><CODE>DWC_SavePrivateDataAsync</CODE></a> for further information about saving to the data storage server.</p><p>A key/value character string with a maximum of 4096 characters (including the NULL terminator) can be created at any one time.</p><p>To add more key/value character strings to this character string, use the <A href="DWC_AddCommonKeyValueString.html"><CODE>DWC_AddCommonKeyValueString</CODE></a> function. Also, use the <a href=DWC_GetCommonValueString.html#dwc__common_8h_1ccb38a8c74cfbd013fb1b1cca709fada><CODE>DWC_GetCommonValueString</CODE></a> function to get the <CODE>value</CODE> string that corresponds to a specific <CODE>key</CODE> string from the key/value string.</p> 61 62<H2>Revision History</H2> 63<DL> 64 65</DL> 66<hr><p>CONFIDENTIAL</p></body> 67</html> 68