Symbian3/Examples/guid-6013a680-57f9-415b-8851-c4fa63356636/stringutils_8h_source.html
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 13 Aug 2010 16:47:46 +0100
changeset 14 578be2adaf3e
parent 6 43e37759235e
permissions -rw-r--r--
Week 32 contribution of PDK documentation content. See release notes for details. Fixes bug Bug 3582

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TB9.2 Example Applications: examples/PIPS/OpenCStringUtilitiesEx/library/inc/stringutils.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2 -->
<h1>examples/PIPS/OpenCStringUtilitiesEx/library/inc/stringutils.h</h1><a href="stringutils_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
<a name="l00002"></a>00002 <span class="comment">* ==============================================================================</span>
<a name="l00003"></a>00003 <span class="comment">*  Name        :        stringutils.h</span>
<a name="l00004"></a>00004 <span class="comment">*  Part of     :        OpenCStringUtilsEx</span>
<a name="l00005"></a>00005 <span class="comment">*  Interface   : </span>
<a name="l00006"></a>00006 <span class="comment">*  Description :        Header file for stringutils</span>
<a name="l00007"></a>00007 <span class="comment">*  Version     : </span>
<a name="l00008"></a>00008 <span class="comment">*</span>
<a name="l00009"></a>00009 <span class="comment">*  Copyright (c) 2005-2007 Nokia Corporation.</span>
<a name="l00010"></a>00010 <span class="comment">*  This material, including documentation and any related </span>
<a name="l00011"></a>00011 <span class="comment">*  computer programs, is protected by copyright controlled by </span>
<a name="l00012"></a>00012 <span class="comment">*  Nokia Corporation.</span>
<a name="l00013"></a>00013 <span class="comment">* ==============================================================================</span>
<a name="l00014"></a>00014 <span class="comment">*/</span>
<a name="l00015"></a>00015 <span class="preprocessor">#ifndef __STRINGUTILS_H__</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span><span class="preprocessor">#define __STRINGUTILS_H__</span>
<a name="l00017"></a>00017 <span class="preprocessor"></span>
<a name="l00025"></a>00025 <span class="comment">//Symbian Headers</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &lt;e32cmn.h&gt;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &lt;wchar.h&gt;</span>
<a name="l00028"></a>00028 
<a name="l00040"></a><a class="code" href="stringutils_8h.html#a0fcdfc9f202050b7e5a2cd54da14d2fe">00040</a> <span class="preprocessor">#define hbufC16towchar  tbufC16towchar</span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00044"></a><a class="code" href="stringutils_8h.html#ac8c22cd9144639f951b2193e373f0d2f">00044</a> <span class="preprocessor">#define hbufC16tochar   tbufC16tochar</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00048"></a><a class="code" href="stringutils_8h.html#a88565a9ed99585f8391862e7f5b4d17c">00048</a> <span class="preprocessor">#define hbufC8towchar   tbufC8towchar</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span>
<a name="l00052"></a><a class="code" href="stringutils_8h.html#a6319f08fa6eea77d034e46eaa60584b0">00052</a> <span class="preprocessor">#define hbufC8tochar    tbufC8tochar</span>
<a name="l00053"></a>00053 <span class="preprocessor"></span>
<a name="l00054"></a>00054                 
<a name="l00055"></a>00055 <span class="comment">//Function prototypes</span>
<a name="l00056"></a>00056 
<a name="l00066"></a>00066 IMPORT_C <span class="keywordtype">wchar_t</span>* <a class="code" href="stringutils_8h.html#a9d3907ae46af2842f427b5c58fe6ac60">tbuf16towchar</a>(TDes&amp; aArg);
<a name="l00067"></a>00067 
<a name="l00073"></a>00073 IMPORT_C <span class="keywordtype">char</span>* <a class="code" href="stringutils_8h.html#a92e6d0f669d9f15f18c3789ddf5ca779">tbuf8tochar</a>(TDes8&amp; aArg);
<a name="l00074"></a>00074 
<a name="l00085"></a>00085 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="stringutils_8h.html#a8d9e370a0c317212eb7193988b2702cf">tbuf16tochar</a>(TDes&amp; aSrc, <span class="keywordtype">char</span>* aDes);
<a name="l00086"></a>00086         
<a name="l00097"></a>00097 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="stringutils_8h.html#ac6ce874e6902d0d6f6142e6660866fcc">tbuf8towchar</a>(TDes8&amp; aSrc, <span class="keywordtype">wchar_t</span>* aDes);
<a name="l00098"></a>00098         
<a name="l00108"></a>00108 IMPORT_C <span class="keywordtype">void</span> <a class="code" href="stringutils_8h.html#a9e6c0fa268a62a4facea28cb5a83bfcb">tbufC16towchar</a>(TDesC&amp; aSrc ,<span class="keywordtype">wchar_t</span>* aDes);
<a name="l00109"></a>00109 
<a name="l00110"></a>00110   
<a name="l00121"></a>00121 IMPORT_C <span class="keywordtype">void</span> <a class="code" href="stringutils_8h.html#a06e4914590a9e3b316c972dd598e2024">tbufC8tochar</a>(TDesC8&amp; aSrc, <span class="keywordtype">char</span>* aDes);
<a name="l00122"></a>00122 
<a name="l00133"></a>00133 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="stringutils_8h.html#a760b3acc819bce96dcc444b61e18985d">tbufC16tochar</a>(TDesC&amp; aSrc, <span class="keywordtype">char</span>* aDes);
<a name="l00134"></a>00134         
<a name="l00135"></a>00135         
<a name="l00146"></a>00146 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="stringutils_8h.html#a756faf258af3a7d145afdf8ad9032908">tbufC8towchar</a>(TDesC8&amp; aSrc, <span class="keywordtype">wchar_t</span>* aDes);
<a name="l00147"></a>00147 
<a name="l00148"></a>00148 
<a name="l00162"></a>00162 IMPORT_C <span class="keywordtype">void</span> <a class="code" href="stringutils_8h.html#af57eac18681e12a2a2579a46f900c531">wchartotbuf16</a>(<span class="keyword">const</span> <span class="keywordtype">wchar_t</span> *aSrc, TDes16&amp; aDes);
<a name="l00163"></a>00163         
<a name="l00164"></a>00164 
<a name="l00174"></a>00174 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="stringutils_8h.html#aa5c2923704de78bc06da21acae819bc7">chartotbuf16</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* aSrc, TDes16&amp; aDes);
<a name="l00175"></a>00175         
<a name="l00186"></a>00186 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="stringutils_8h.html#a74d0bc81ee2e712248f5c18b23411100">wchartotbuf8</a>(<span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* aSrc, TDes8&amp; aDes);
<a name="l00187"></a>00187 
<a name="l00188"></a>00188 
<a name="l00189"></a>00189  <span class="comment">/*</span>
<a name="l00190"></a>00190 <span class="comment">  * This Api converts the character string to a TBuf8. It is user </span>
<a name="l00191"></a>00191 <span class="comment">  *     responsibality to allocate a required size of TBuf8 object. Api may     </span>
<a name="l00192"></a>00192 <span class="comment">  * resulting in crash, if the destination object size is smaller than</span>
<a name="l00193"></a>00193 <span class="comment">  * that of the source.</span>
<a name="l00194"></a>00194 <span class="comment">  * @param              aSrc character pointer.</span>
<a name="l00195"></a>00195 <span class="comment">  * @param              aDes TBuf8 object, to which the resultant string will be copied.</span>
<a name="l00196"></a>00196 <span class="comment">  *     @return         none</span>
<a name="l00197"></a>00197 <span class="comment">  */</span>
<a name="l00198"></a>00198 IMPORT_C <span class="keywordtype">void</span> chartotbuf8(<span class="keyword">const</span> <span class="keywordtype">char</span>* aSrc, TDes8&amp; aDes);
<a name="l00199"></a>00199 
<a name="l00200"></a>00200 
<a name="l00209"></a>00209 IMPORT_C <span class="keywordtype">void</span> <a class="code" href="stringutils_8h.html#a328900ebbbca3b494bd356d272433892">wchartohbufc16</a>(<span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* aSrc, HBufC16&amp; aDes);
<a name="l00210"></a>00210         
<a name="l00211"></a>00211 
<a name="l00221"></a>00221 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="stringutils_8h.html#aecde687b6096958e753361b93a22ba23">chartohbufc16</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* aSrc, HBufC16&amp; aDes);
<a name="l00222"></a>00222         
<a name="l00232"></a>00232 IMPORT_C <span class="keywordtype">int</span> <a class="code" href="stringutils_8h.html#ab28f816757c669da455d3112bc013a75">wchartohbufc8</a>(<span class="keyword">const</span> <span class="keywordtype">wchar_t</span>* aSrc, HBufC8&amp; aDes);
<a name="l00233"></a>00233 
<a name="l00234"></a>00234   
<a name="l00235"></a>00235  <span class="comment">/*</span>
<a name="l00236"></a>00236 <span class="comment">  * This Api converts the char to a HBufC8. It is user responsibality </span>
<a name="l00237"></a>00237 <span class="comment">  * to allocate a required size of HBufC8 object. Api may resulting in crash,</span>
<a name="l00238"></a>00238 <span class="comment">  * if the destination object size is smaller than      that of the source.</span>
<a name="l00239"></a>00239 <span class="comment">  * @param              aSrc character pointer.</span>
<a name="l00240"></a>00240 <span class="comment">  * @param              aDes HBufC8 object, to which the resultant string will be copied.</span>
<a name="l00241"></a>00241 <span class="comment">  * @return             none</span>
<a name="l00242"></a>00242 <span class="comment">  */</span>
<a name="l00243"></a>00243 IMPORT_C <span class="keywordtype">void</span> chartohbufc8(<span class="keyword">const</span> <span class="keywordtype">char</span>* aSrc, HBufC8&amp; aDes);
<a name="l00244"></a>00244         
<a name="l00245"></a>00245 <span class="preprocessor">#endif </span><span class="comment">/*__STRINGUTILS_H__*/</span>
</pre></div></div>
<hr size="1"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
</body>
</html>