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_AddCommonKeyValueString</title>
9<LINK rel="stylesheet" href="../css/nitro.css" type="text/css">
10</head>
11
12<body>
13<a name="dwc__common_8h_1ba72325abbd5f3cd3f9485f6be8bcf6d"></a>
14<h1 align="left">DWC_AddCommonKeyValueString</h1>
15<h2>Syntax</h2>
16
17<dl>
18  <dd>
19<CODE>#include &lt;dwc.h&gt;</CODE><BR>
20  <BR>
21  <PRE><CODE>int <a href=DWC_AddCommonKeyValueString.html#dwc__common_8h_1ba72325abbd5f3cd3f9485f6be8bcf6d>DWC_AddCommonKeyValueString</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%">The pointer to the <CODE>key</CODE> character string to add.</TD>
35    </TR>
36
37    <TR>
38<TD width="13%"><EM><STRONG>value</STRONG></EM></TD>
39<TD width="87%">The pointer to the <CODE>value</CODE> character string to add.</TD>
40    </TR>
41
42    <TR>
43<TD width="13%"><EM><STRONG>string</STRONG></EM></TD>
44<TD width="87%">The pointer to the character string to which the key/value character string is to be added.</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 adds a key/value character string to the end of a character string.</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, if this function is called specifying <CODE>string = &quot;/key1/value1&quot;</CODE>, <CODE>key = &quot;key2&quot;</CODE>, <CODE>value = &quot;value2&quot;</CODE>, and <CODE>separator = '/'</CODE>, the string <CODE>&quot;/key1/value1/key2/value2&quot;</CODE> will be 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 added at one time.</p><p>Use the <a href=DWC_SetCommonKeyValueString.html#dwc__common_8h_15da1248b53189ca3688011a533236f75><CODE>DWC_SetCommonKeyValueString</CODE></a> function when creating a key/value character string. 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