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

📄 classlog4cpp_1_1stringutil.html

📁 log4cpp 的参考文档, 一个非常好用的C++ log 类库
💻 HTML
字号:
<!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>log4cpp: log4cpp::StringUtil Class Reference</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.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><div class="nav"><a class="el" href="namespacelog4cpp.html">log4cpp</a>::<a class="el" href="classlog4cpp_1_1StringUtil.html">StringUtil</a></div><h1>log4cpp::StringUtil Class Reference</h1><code>#include &lt;<a class="el" href="StringUtil_8hh-source.html">StringUtil.hh</a>&gt;</code><p><a href="classlog4cpp_1_1StringUtil-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1StringUtil.html#e0">vform</a> (const char *format, va_list args)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a string contructed from the a format specifier and a va_list of arguments, analogously to vprintf(3).  <a href="#e0"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1StringUtil.html#e1">trim</a> (const std::string &amp;s)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a string identical to the given string but without leading or trailing HTABs or spaces.  <a href="#e1"></a><br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">static unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1StringUtil.html#e2">split</a> (std::vector&lt; std::string &gt; &amp;v, const std::string &amp;s, char delimiter, unsigned int maxSegments=INT_MAX)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">splits a string into a vector of string segments based on the given delimiter.  <a href="#e2"></a><br></td></tr><tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T&gt; </td></tr><tr><td class="memTemplItemLeft" nowrap align="right" valign="top">static unsigned int&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classlog4cpp_1_1StringUtil.html#e3">split</a> (T &amp;output, const std::string &amp;s, char delimiter, unsigned int maxSegments=INT_MAX)</td></tr><tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">splits a string into string segments based on the given delimiter and assigns the segments through an output_iterator.  <a href="#e3"></a><br></td></tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="e3" doxytag="log4cpp::StringUtil::split"></a><p><table class="mdTable" cellpadding="2" cellspacing="0">  <tr>    <td class="mdRow">      <table cellpadding="0" cellspacing="0" border="0">        <tr>          <td class="mdPrefix" colspan="4">template&lt;typename T&gt; </td>        </tr>        <tr>          <td class="md" nowrap valign="top">static unsigned int log4cpp::StringUtil::split           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">T &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>output</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const std::string &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>s</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>char&nbsp;</td>          <td class="mdname" nowrap> <em>delimiter</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>unsigned int&nbsp;</td>          <td class="mdname" nowrap> <em>maxSegments</em> = <code>INT_MAX</code></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [inline, static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>splits a string into string segments based on the given delimiter and assigns the segments through an output_iterator. <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>output</em>&nbsp;</td><td>The output_iterator through which to assign the string segments. Typically this will be a back_insertion_iterator. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>The string to split into segments. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>delimiter</em>&nbsp;</td><td>The delimiter character </td></tr>    <tr><td valign="top"></td><td valign="top"><em>maxSegments</em>&nbsp;</td><td>The maximum number of segments. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The actual number of segments (limited by maxSegments). </dd></dl>    </td>  </tr></table><a class="anchor" name="e2" doxytag="log4cpp::StringUtil::split"></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">unsigned int log4cpp::StringUtil::split           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">std::vector&lt; std::string &gt; &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>v</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>const std::string &amp;&nbsp;</td>          <td class="mdname" nowrap> <em>s</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>char&nbsp;</td>          <td class="mdname" nowrap> <em>delimiter</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>unsigned int&nbsp;</td>          <td class="mdname" nowrap> <em>maxSegments</em> = <code>INT_MAX</code></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>splits a string into a vector of string segments based on the given delimiter. <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>v</em>&nbsp;</td><td>The vector in which the segments will be stored. The vector will be emptied before storing the segments </td></tr>    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>The string to split into segments. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>delimiter</em>&nbsp;</td><td>The delimiter character </td></tr>    <tr><td valign="top"></td><td valign="top"><em>maxSegments</em>&nbsp;</td><td>the maximum number of segments. Upon return v.size() &lt;= maxSegments. The string is scanned from left to right so v[maxSegments - 1] may contain a string containing the delimiter character. </td></tr>  </table></dl><dl compact><dt><b>Returns:</b></dt><dd>The actual number of segments (limited by maxSegments). </dd></dl>    </td>  </tr></table><a class="anchor" name="e1" doxytag="log4cpp::StringUtil::trim"></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">std::string log4cpp::StringUtil::trim           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>          <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>          <td class="md" valign="top">&nbsp;)&nbsp;</td>          <td class="md" nowrap><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Returns a string identical to the given string but without leading or trailing HTABs or spaces. <p>    </td>  </tr></table><a class="anchor" name="e0" doxytag="log4cpp::StringUtil::vform"></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">std::string log4cpp::StringUtil::vform           </td>          <td class="md" valign="top">(&nbsp;</td>          <td class="md" nowrap valign="top">const char *&nbsp;</td>          <td class="mdname" nowrap> <em>format</em>, </td>        </tr>        <tr>          <td class="md" nowrap align="right"></td>          <td class="md"></td>          <td class="md" nowrap>va_list&nbsp;</td>          <td class="mdname" nowrap> <em>args</em></td>        </tr>        <tr>          <td class="md"></td>          <td class="md">)&nbsp;</td>          <td class="md" colspan="2"><code> [static]</code></td>        </tr>      </table>    </td>  </tr></table><table cellspacing="5" cellpadding="0" border="0">  <tr>    <td>      &nbsp;    </td>    <td><p>Returns a string contructed from the a format specifier and a va_list of arguments, analogously to vprintf(3). <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>format</em>&nbsp;</td><td>the format specifier. </td></tr>    <tr><td valign="top"></td><td valign="top"><em>args</em>&nbsp;</td><td>the va_list of arguments. </td></tr>  </table></dl>    </td>  </tr></table><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="StringUtil_8hh-source.html">StringUtil.hh</a><li><a class="el" href="StringUtil_8cpp.html">StringUtil.cpp</a></ul><hr size="1"><address style="align: right;"><small>Generated on Fri Jul 29 14:13:21 2005 for log4cpp by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="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 + -