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

📄 spex-en.html

📁 Tokyo Cabinet的Tokyo Cabinet 是一个DBM的实现。这里的数据库由一系列key-value对的记录构成。key和value都可以是任意长度的字节序列,既可以是二进制也可以是字符
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<dd>`<var>xstr</var>' specifies the extensible string object.</dd><dd>The return value is the pointer of the region of the object.</dd><dd>Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string.</dd></dl><p>The function `tcxstrsize' is used in order to get the size of the region of an extensible string object.</p><dl class="api"><dt><code>int tcxstrsize(const TCXSTR *<var>xstr</var>);</code></dt><dd>`<var>xstr</var>' specifies the extensible string object.</dd><dd>The return value is the size of the region of the object.</dd></dl><p>The function `tcxstrclear' is used in order to clear an extensible string object.</p><dl class="api"><dt><code>void tcxstrclear(TCXSTR *<var>xstr</var>);</code></dt><dd>`<var>xstr</var>' specifies the extensible string object.</dd><dd>The internal buffer of the object is cleared and the size is set zero.</dd></dl><p>The function `tcxstrprintf' is used in order to perform formatted output into an extensible string object.</p><dl class="api"><dt><code>void tcxstrprintf(TCXSTR *<var>xstr</var>, const char *<var>format</var>, ...);</code></dt><dd>`<var>xstr</var>' specifies the extensible string object.</dd><dd>`<var>format</var>' specifies the printf-like format string.  The conversion character `%' can be used with such flag characters as `s', `d', `o', `u', `x', `X', `c', `e', `E', `f', `g', `G', `@', `?', `b', and `%'.  `@' works as with `s' but escapes meta characters of XML.  `?' works as with `s' but escapes meta characters of URL.  `b' converts an integer to the string as binary numbers.  The other conversion character work as with each original.</dd><dd>The other arguments are used according to the format string.</dd></dl><p>The function `tcsprintf' is used in order to allocate a formatted string on memory.</p><dl class="api"><dt><code>char *tcsprintf(const char *<var>format</var>, ...);</code></dt><dd>`<var>format</var>' specifies the printf-like format string.  The conversion character `%' can be used with such flag characters as `s', `d', `o', `u', `x', `X', `c', `e', `E', `f', `g', `G', `@', `?', `b', and `%'.  `@' works as with `s' but escapes meta characters of XML.  `?' works as with `s' but escapes meta characters of URL.  `b' converts an integer to the string as binary numbers.  The other conversion character work as with each original.</dd><dd>The other arguments are used according to the format string.</dd><dd>The return value is the pointer to the region of the result string.</dd><dd>Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.</dd></dl><h3 id="tcutilapi_listapi">API of Array List</h3><p>The function `tclistnew' is used in order to create a list object.</p><dl class="api"><dt><code>TCLIST *tclistnew(void);</code></dt><dd>The return value is the new list object.</dd></dl><p>The function `tclistnew2' is used in order to create a list object with expecting the number of elements.</p><dl class="api"><dt><code>TCLIST *tclistnew2(int <var>anum</var>);</code></dt><dd>`<var>anum</var>' specifies the number of elements expected to be stored in the list.</dd><dd>The return value is the new list object.</dd></dl><p>The function `tclistnew3' is used in order to create a list object with initial string elements.</p><dl class="api"><dt><code>TCLIST *tclistnew3(const char *<var>str</var>, ...);</code></dt><dd>`<var>str</var>' specifies the string of the first element.</dd><dd>The other arguments are other elements.  They should be trailed by a `NULL' argument.</dd><dd>The return value is the new list object.</dd></dl><p>The function `tclistdup' is used in order to copy a list object.</p><dl class="api"><dt><code>TCLIST *tclistdup(const TCLIST *<var>list</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>The return value is the new list object equivalent to the specified object.</dd></dl><p>The function `tclistdel' is used in order to delete a list object.</p><dl class="api"><dt><code>void tclistdel(TCLIST *<var>list</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>Note that the deleted object and its derivatives can not be used anymore.</dd></dl><p>The function `tclistnum' is used in order to get the number of elements of a list object.</p><dl class="api"><dt><code>int tclistnum(const TCLIST *<var>list</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>The return value is the number of elements of the list.</dd></dl><p>The function `tclistval' is used in order to get the pointer to the region of an element of a list object.</p><dl class="api"><dt><code>const void *tclistval(const TCLIST *<var>list</var>, int <var>index</var>, int *<var>sp</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>`<var>index</var>' specifies the index of the element.</dd><dd>`<var>sp</var>' specifies the pointer to the variable into which the size of the region of the return value is assigned.</dd><dd>The return value is the pointer to the region of the value.</dd><dd>Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string.  If `index' is equal to or more than the number of elements, the return value is `NULL'.</dd></dl><p>The function `tclistval2' is used in order to get the string of an element of a list object.</p><dl class="api"><dt><code>const char *tclistval2(const TCLIST *<var>list</var>, int <var>index</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>`<var>index</var>' specifies the index of the element.</dd><dd>The return value is the string of the value.</dd><dd>If `index' is equal to or more than the number of elements, the return value is `NULL'.</dd></dl><p>The function `tclistpush' is used in order to add an element at the end of a list object.</p><dl class="api"><dt><code>void tclistpush(TCLIST *<var>list</var>, const void *<var>ptr</var>, int <var>size</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>`<var>ptr</var>' specifies the pointer to the region of the new element.</dd><dd>`<var>size</var>' specifies the size of the region.</dd></dl><p>The function `tclistpush2' is used in order to add a string element at the end of a list object.</p><dl class="api"><dt><code>void tclistpush2(TCLIST *<var>list</var>, const char *<var>str</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>`<var>str</var>' specifies the string of the new element.</dd></dl><p>The function `tclistpop' is used in order to remove an element of the end of a list object.</p><dl class="api"><dt><code>void *tclistpop(TCLIST *<var>list</var>, int *<var>sp</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>`<var>sp</var>' specifies the pointer to the variable into which the size of the region of the return value is assigned.</dd><dd>The return value is the pointer to the region of the removed element.</dd><dd>Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.  If the list is empty, the return value is `NULL'.</dd></dl><p>The function `tclistpop2' is used in order to remove a string element of the end of a list object.</p><dl class="api"><dt><code>char *tclistpop2(TCLIST *<var>list</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>The return value is the string of the removed element.</dd><dd>Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.  If the list is empty, the return value is `NULL'.</dd></dl><p>The function `tclistunshift' is used in order to add an element at the top of a list object.</p><dl class="api"><dt><code>void tclistunshift(TCLIST *<var>list</var>, const void *<var>ptr</var>, int <var>size</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>`<var>ptr</var>' specifies the pointer to the region of the new element.</dd><dd>`<var>size</var>' specifies the size of the region.</dd></dl><p>The function `tclistunshift2' is used in order to add a string element at the top of a list object.</p><dl class="api"><dt><code>void tclistunshift2(TCLIST *<var>list</var>, const char *<var>str</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>`<var>str</var>' specifies the string of the new element.</dd></dl><p>The function `tclistshift' is used in order to remove an element of the top of a list object.</p><dl class="api"><dt><code>void *tclistshift(TCLIST *<var>list</var>, int *<var>sp</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>`<var>sp</var>' specifies the pointer to the variable into which the size of the region of the return value is assigned.</dd><dd>The return value is the pointer to the region of the removed element.</dd><dd>Because an additional zero code is appended at the end of the region of the return value, the return value can be treated as a character string.  Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.  If the list is empty, the return value is `NULL'.</dd></dl><p>The function `tclistshift2' is used in order to remove a string element of the top of a list object.</p><dl class="api"><dt><code>char *tclistshift2(TCLIST *<var>list</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>The return value is the string of the removed element.</dd><dd>Because the region of the return value is allocated with the `malloc' call, it should be released with the `free' call when it is no longer in use.  If the list is empty, the return value is `NULL'.</dd></dl><p>The function `tclistinsert' is used in order to add an element at the specified location of a list object.</p><dl class="api"><dt><code>void tclistinsert(TCLIST *<var>list</var>, int <var>index</var>, const void *<var>ptr</var>, int <var>size</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>`<var>index</var>' specifies the index of the new element.</dd><dd>`<var>ptr</var>' specifies the pointer to the region of the new element.</dd><dd>`<var>size</var>' specifies the size of the region.</dd><dd>If `index' is equal to or more than the number of elements, this function has no effect.</dd></dl><p>The function `tclistinsert2' is used in order to add a string element at the specified location of a list object.</p><dl class="api"><dt><code>void tclistinsert2(TCLIST *<var>list</var>, int <var>index</var>, const char *<var>str</var>);</code></dt><dd>`<var>list</var>' specifies the list object.</dd><dd>`<var>index</var>' specifies the index of the new element.</dd><dd>`<var>str</var>' specifies the string of the new element.</dd><dd>If `index' is equal to or more than the number of elements, this function has no effect.</dd></dl><p>The function `tclistremove' is used in order to remove an element at the specified location of a list object.</p>

⌨️ 快捷键说明

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