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

📄 group__apr__strings.html

📁 apr函数库使用手册
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!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>Apache Portable Runtime: String routines</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.7 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>String routines</h1><table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>Modules</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>group &nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group___a_p_r___strings___snprintf.html">snprintf implementations</a></td></tr>

<tr><td colspan=2><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga0">apr_strnatcmp</a> (char const *a, char const *b)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga1">apr_strnatcasecmp</a> (char const *a, char const *b)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga2">apr_pstrdup</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, const char *s)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga3">apr_pstrmemdup</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, const char *s, apr_size_t n)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga4">apr_pstrndup</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, const char *s, apr_size_t n)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>void *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga5">apr_pmemdup</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, const void *m, apr_size_t n)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga6">apr_pstrcat</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p,...)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga7">apr_pstrcatv</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, const struct iovec *vec, apr_size_t nvec, apr_size_t *nbytes)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga8">apr_pvsprintf</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, const char *fmt, va_list ap)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga9">apr_psprintf</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, const char *fmt,...)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga10">apr_cpystrn</a> (char *dst, const char *src, apr_size_t dst_size)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga11">apr_collapse_spaces</a> (char *dest, const char *src)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga12">apr_tokenize_to_argv</a> (const char *arg_str, char ***argv_out, <a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *token_context)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga13">apr_strtok</a> (char *str, const char *sep, char **last)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga14">apr_itoa</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, int n)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga15">apr_ltoa</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, long n)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga16">apr_off_t_toa</a> (<a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *p, apr_off_t n)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top><a class="el" href="group__apr__errno.html#ga0">apr_status_t</a>&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga17">apr_strtoff</a> (apr_off_t *offset, const char *buf, char **end, int base)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>apr_int64_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga18">apr_strtoi64</a> (const char *buf, char **end, int base)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>apr_int64_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga19">apr_atoi64</a> (const char *buf)</td></tr>

<tr><td class="memItemLeft" nowrap align=right valign=top>char *&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="group__apr__strings.html#ga20">apr_strfsize</a> (apr_off_t size, char *buf)</td></tr>

</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga19" doxytag="apr_strings.h::apr_atoi64" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> apr_int64_t apr_atoi64           </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>buf</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>
parse a base-10 numeric string into a 64-bit numeric value. Equivalent to apr_strtoi64(buf, (char**)NULL, 10). <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>buf</em>&nbsp;</td><td>The string to parse </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The numeric value of the string </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga11" doxytag="apr_strings.h::apr_collapse_spaces" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char* apr_collapse_spaces           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char *&nbsp;</td>
          <td class="mdname" nowrap> <em>dest</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>src</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Strip spaces from a string <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>dest</em>&nbsp;</td><td>The destination string. It is okay to modify the string in place. Namely dest == src </td></tr>
    <tr><td></td><td valign=top><em>src</em>&nbsp;</td><td>The string to rid the spaces from. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The destination string, dest. </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga10" doxytag="apr_strings.h::apr_cpystrn" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char* apr_cpystrn           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">char *&nbsp;</td>
          <td class="mdname" nowrap> <em>dst</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>src</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>apr_size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>dst_size</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Copy up to dst_size characters from src to dst; does not copy past a NUL terminator in src, but always terminates dst with a NUL regardless. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>dst</em>&nbsp;</td><td>The destination string </td></tr>
    <tr><td></td><td valign=top><em>src</em>&nbsp;</td><td>The source string </td></tr>
    <tr><td></td><td valign=top><em>dst_size</em>&nbsp;</td><td>The space available in dst; dst always receives NUL termination, so if src is longer than dst_size, the actual number of characters copied is dst_size - 1. </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Pointer to the NUL terminator of the destination string, dst </dd></dl>
<dl compact><dt><b>Remarks:</b></dt><dd><pre>
 Note the differences between this function and strncpy():
  1) strncpy() doesn't always NUL terminate; <a class="el" href="group__apr__strings.html#ga10">apr_cpystrn()</a> does.
  2) strncpy() pads the destination string with NULs, which is often 
     unnecessary; <a class="el" href="group__apr__strings.html#ga10">apr_cpystrn()</a> does not.
  3) strncpy() returns a pointer to the beginning of the dst string;
     <a class="el" href="group__apr__strings.html#ga10">apr_cpystrn()</a> returns a pointer to the NUL terminator of dst, 
     to allow a check for truncation.
 </pre> </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga14" doxytag="apr_strings.h::apr_itoa" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char* apr_itoa           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>int&nbsp;</td>
          <td class="mdname" nowrap> <em>n</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
create a string representation of an int, allocated from a pool <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td></td><td valign=top><em>p</em>&nbsp;</td><td>The pool from which to allocate </td></tr>
    <tr><td></td><td valign=top><em>n</em>&nbsp;</td><td>The number to format </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>The string representation of the number </dd></dl>
    </td>
  </tr>
</table>
<a class="anchor" name="ga15" doxytag="apr_strings.h::apr_ltoa" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> char* apr_ltoa           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="group__apr__pools.html#ga0">apr_pool_t</a> *&nbsp;</td>
          <td class="mdname" nowrap> <em>p</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td></td>
          <td class="md" nowrap>long&nbsp;</td>
          <td class="mdname" nowrap> <em>n</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>

⌨️ 快捷键说明

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