⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group__fixed__str.htm

📁 MINIGUI1.6开发API
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>MiniGUI V1.6.10 API Reference: Length-Fixed string operations</title><link href="doxygen.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="index.htm">Main&nbsp;Page</a> | <a class="qindex" href="modules.htm">Modules</a> | <a class="qindex" href="classes.htm">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.htm">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.htm">Directories</a> | <a class="qindex" href="files.htm">File&nbsp;List</a> | <a class="qindex" href="functions.htm">Data&nbsp;Fields</a> | <a class="qindex" href="globals.htm">Globals</a> | <a class="qindex" href="pages.htm">Related&nbsp;Pages</a></div><h1>Length-Fixed string operations<br><small>[<a class="el" href="group__lite__fns.htm">MiniGUI-Processes specific functions</a>]</small></h1><h2>Functions</h2><ul><li>MG_EXPORT char *GUIAPI <a class="el" href="group__fixed__str.htm#ga0">FixStrAlloc</a> (int len)<dl class="el"><dd class="mdescRight">Allocates a buffer for a length-fixed string.  <a href="#ga0"></a><br></dl><li>MG_EXPORT char *GUIAPI <a class="el" href="group__fixed__str.htm#ga1">FixStrDup</a> (const char *str)<dl class="el"><dd class="mdescRight">Duplicates a length-fixed string.  <a href="#ga1"></a><br></dl><li>MG_EXPORT void GUIAPI <a class="el" href="group__fixed__str.htm#ga2">FreeFixStr</a> (char *str)<dl class="el"><dd class="mdescRight">Frees a length-fixed string.  <a href="#ga2"></a><br></dl></ul><hr><a name="_details"></a><h2>Detailed Description</h2>MiniGUI maintains a private heap for length-fixed strings, and allocates length-fixed strings from this heap for window caption, menu item text, and so on. You can also use this private heap to allocate length-fixed strings.<p><div class="fragment"><pre class="fragment">    <span class="keywordtype">char</span> * buffer = <a class="code" href="group__fixed__str.htm#ga0">FixStrAlloc</a> (strlen (<span class="stringliteral">"Hello, world!"</span>));    <span class="keywordflow">if</span> (buffer)        strcpy (buffer, <span class="stringliteral">"Hello, world!"</span>);    ...    <a class="code" href="group__fixed__str.htm#ga2">FreeFixStr</a> (buffer);</pre></div> <hr><h2>Function Documentation</h2><a class="anchor" name="ga0" doxytag="minigui.h::FixStrAlloc"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">char *GUIAPI FixStrAlloc           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">int&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>len</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Allocates a buffer for a length-fixed string. <p>This function allocates a buffer from the length-fixed string heap for a string which is <em>len</em> bytes long (does not include the null character of the string).<p><dl compact><dt><b>Note:</b></dt><dd>You can change the content of the string, but do not change the length of this string (shorter is valid) via <em>strcat</em> function or other equivalent functions or operations.</dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>The length of the string.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The pointer to the buffer on success, otherwise NULL.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fixed__str.htm#ga2">FreeFixStr</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga1" doxytag="minigui.h::FixStrDup"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">char *GUIAPI FixStrDup           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const char *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>str</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Duplicates a length-fixed string. <p>This function allocates a buffer from the length-fixed string heap and copy the string <em>str</em> to the buffer.<p><dl compact><dt><b>Note:</b></dt><dd>You can change the content of the string, but do not change the length of this string (shorter is valid) via <em>strcat</em> function or other equivalent functions or operations.</dd></dl><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>str</em>&nbsp;</td><td>The pointer to the string will be duplicated.</td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The pointer to the buffer on success, otherwise NULL.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fixed__str.htm#ga2">FreeFixStr</a> </dd></dl>    </td>  </tr></table><a class="anchor" name="ga2" doxytag="minigui.h::FreeFixStr"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="md" nowrap valign="top">void GUIAPI FreeFixStr           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">char *&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>str</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Frees a length-fixed string. <p>This function frees the buffer used by the length-fixed string <em>str</em>.<p><dl compact><dt><b>Parameters:</b></dt><dd>  <table border="0" cellspacing="2" cellpadding="0">    <tr><td valign="top"></td><td valign="top"><em>str</em>&nbsp;</td><td>The length-fixed string.</td></tr>  </table></dl><dl compact><dt><b>Note:</b></dt><dd>Do not use <em>free</em> to free the length-fixed string.</dd></dl><dl compact><dt><b>See also:</b></dt><dd><a class="el" href="group__fixed__str.htm#ga0">FixStrAlloc</a> </dd></dl>    </td>  </tr></table><hr size="1"><address style="align: right;"><small>Generated on Thu Nov 22 15:35:54 2007 for MiniGUI V1.6.10 API Reference by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="http://www.minigui.com/api_ref/1.6.10/doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -