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

📄 string2.html

📁 ST20 Embedded Toolset R2.0.5用于开发基于ST20芯片机顶盒软件的开发平台,2.0.5版本,国内找不到的.在国外论坛上花了N天才找到!
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<H3><CODE><A NAME="char_traits::copy">char_traits::copy</A></CODE></H3><PRE>static char_type <B>*copy</B>(char_type *first1, const char_type *first2,    size_t count);</PRE><P>The static member function copies the sequence of <CODE>count</CODE>elements beginning at <CODE>first2</CODE> to the array beginning at <CODE>first1</CODE>,then returns <CODE>first1</CODE>. The source and destinationmust not overlap.</P><H3><A NAME="char_traits::eof"><CODE>char_traits::eof</CODE></A></H3><PRE>static int_type <B>eof</B>();</PRE><P>The static member function returns a value that representsend-of-file (<CODE><A HREF="stdio.html#EOF">EOF</A></CODE>).</P><H3><CODE><A NAME="char_traits::eq">char_traits::eq</A></CODE></H3><PRE>static bool <B>eq</B>(const char_type&amp; left, const char_type&amp; right);</PRE><P>The static member function returns true if <CODE>left</CODE> comparesequal to <CODE>right</CODE>.</P><H3><A NAME="char_traits::eq_int_type"><CODE>char_traits::eq_int_type</CODE></A></H3><PRE>static bool <B>eq_int_type</B>(const int_type&amp; left,    const int_type&amp; right);</PRE><P>The static member function returns true if<CODE>left</CODE> compares equal to <CODE>right</CODE>.</P><H3><CODE><A NAME="char_traits::find">char_traits::find</A></CODE></H3><PRE>static const char_type *<B>find</B>(const char_type *first,    size_t count, const char_type&amp; ch);</PRE><P>The static member function determines the lowest <CODE>N</CODE>in the range <CODE>[0, count)</CODE> for which<CODE><A HREF="#char_traits::eq">eq</A>(first[N], ch)</CODE>is true. If successful, it returns <CODE>first + N</CODE>. Otherwise,it returns a null pointer.</P><H3><A NAME="char_traits::int_type"><CODE>char_traits::int_type</CODE></A></H3><PRE>typedef int <B>int_type</B>;</PRE><P>The type is a synonym for <I>int.</I></P><H3><CODE><A NAME="char_traits::length">char_traits::length</A></CODE></H3><PRE>static size_t <B>length</B>(const char_type *first);</PRE><P>The static member function returns the number of elements<CODE>N</CODE> in the sequence beginning at <CODE>first</CODE>up to but not including the element <CODE>first[N]</CODE> whichcompares equal to <CODE>char_type()</CODE>.</P><H3><CODE><A NAME="char_traits::lt">char_traits::lt</A></CODE></H3><PRE>static bool <B>lt</B>(const char_type&amp; left, const char_type&amp; right);</PRE><P>The static member function returns true if <CODE>left</CODE> comparesless than <CODE>right</CODE>.</P><H3><CODE><A NAME="char_traits::move">char_traits::move</A></CODE></H3><PRE>static char_type <B>*move</B>(char_type *first1, const char_type *first2,    size_t count);</PRE><P>The static member function copies the sequence of <CODE>count</CODE>elements beginning at <CODE>first2</CODE> to the array beginning at <CODE>first1</CODE>,then returns <CODE>first1</CODE>. The source and destination may overlap.</P><H3><A NAME="char_traits::not_eof"><CODE>char_traits::not_eof</CODE></A></H3><PRE>static int_type <B>not_eof</B>(const int_type&amp; meta);</PRE><P>If<CODE>!<A HREF="#char_traits::eq_int_type">eq_int_type</A>(<A HREF="#char_traits::eof">eof</A>(), meta)</CODE>,the static member function returns <CODE>meta</CODE>.Otherwise, it returns a value other than<CODE>eof()</CODE>.</P><H3><A NAME="char_traits::off_type"><CODE>char_traits::off_type</CODE></A></H3><PRE>typedef streamoff <B>off_type</B>;</PRE><P>The type is a synonym for<CODE><A HREF="ios.html#streamoff">streamoff</A></CODE>.</P><H3><A NAME="char_traits::pos_type"><CODE>char_traits::pos_type</CODE></A></H3><PRE>typedef streampos <B>pos_type</B>;</PRE><P>The type is a synonym for<CODE><A HREF="ios.html#streampos">streampos</A></CODE>.</P><H3><A NAME="char_traits::state_type"><CODE>char_traits::state_type</CODE></A></H3><PRE>typedef mbstate_t <B>state_type</B>;</PRE><P>The type is a synonym for<CODE><A HREF="ios.html#mbstate_t">mbstate_t</A></CODE>.</P><H3><A NAME="char_traits::to_char_type"><CODE>char_traits::to_char_type</CODE></A></H3><PRE>static char_type <B>to_char_type</B>(const int_type&amp; meta);</PRE><P>The static member function returns <CODE>meta</CODE> represented astype <CODE>Elem</CODE>. A value of <CODE>meta</CODE> that cannot be sorepresented yields an unspecified result.</P><H3><A NAME="char_traits::to_int_type"><CODE>char_traits::to_int_type</CODE></A></H3><PRE>static int_type <B>to_int_type</B>(const char_type&amp; ch);</PRE><P>The static member function returns <CODE>ch</CODE> represented astype <CODE>int_type</CODE>. It must be possible to convert any value <CODE>ch</CODE> of type<CODE>Elem</CODE> to <CODE>int_type</CODE> (by evaluating<CODE>meta = <A HREF="#char_traits::to_int_type">to_int_type</A>(ch)</CODE>)then back to <CODE>Elem</CODE> (by evaluating<CODE>ch = <A HREF="#char_traits::to_char_type">to_char_type</A>(meta)</CODE>)and obtain a value that compares equal to <CODE>ch</CODE>.<H2><A NAME="getline"><CODE>getline</CODE></A></H2><PRE>istream&amp; <B>getline</B>(istream&amp; istr,    string&amp; str);istream&amp; <B>getline</B>(istream&amp; istr,    string&amp; str, char delim);</PRE><P>The first function returns <CODE>getline(istr, str, istr.widen('\n'))</CODE>.<P>The second function replaces the sequence controlled by<CODE>str</CODE> with a sequence of elements extracted from the stream<CODE>istr</CODE>. In order of testing, extraction stops:</P><OL><LI>at end of file</LI><LI>after the function extracts an element that compares equal to<CODE>delim</CODE>, in which case the element is neither put back norappended to the controlled sequence</LI><LI>after the function extracts<CODE>str.<A HREF="#string::max_size">max_size</A>()</CODE>elements, in which case the function calls<CODE><A HREF="ios.html#ios::setstate">setstate</A>(ios_base::failbit)</CODE>.</LI></OL><P>If the function extracts no elements, it calls<CODE>setstate(failbit)</CODE>.In any case, it returns <CODE>istr</CODE>.</P><H2><A NAME="operator+"><CODE>operator+</CODE></A></H2><PRE>string <B>operator+</B>(    const string&amp; left,    const string&amp; right);string <B>operator+</B>(    const string&amp; left,    const char *right);string <B>operator+</B>(    const string&amp; left,    char right);string <B>operator+</B>(    const char *left,    const string&amp; right);string <B>operator+</B>(    char left,    const string&amp; right);</PRE><P>The functions each overload <CODE>operator+</CODE> toconcatenate two objects of class<A HREF="#string"><CODE>string</CODE></A>.All effectively return<CODE>string(left).<A HREF="#string::append">append</A>(right)</CODE>.</P><H2><A NAME="operator!="><CODE>operator!=</CODE></A></H2><PRE>bool <B>operator!=</B>(    const string&amp; left,    const string&amp; right);bool <B>operator!=</B>(    const string&amp; left,    const char *right);bool <B>operator!=</B>(    const char *left,    const string&amp; right);</PRE><P>The functions each overload <CODE>operator!=</CODE> to comparetwo objects of class<A HREF="#string"><CODE>string</CODE></A>. All effectivelyreturn <CODE>string(left).<A HREF="#string::compare">compare</A>(right)!= 0</CODE>.</P><H2><A NAME="operator=="><CODE>operator==</CODE></A></H2><PRE>bool <B>operator==</B>(    const string&amp; left,    const string&amp; right);bool <B>operator==</B>(    const string&amp; left,    const char *right);bool <B>operator==</B>(    const char *left,    const string&amp; right);</PRE><P>The functions each overload <CODE>operator==</CODE> to comparetwo objects of class<A HREF="#string"><CODE>string</CODE></A>. All effectivelyreturn <CODE>string(left).<A HREF="#string::compare">compare</A>(right)== 0</CODE>.</P><H2><A NAME="operator&lt;"><CODE>operator&lt;</CODE></A></H2><PRE>bool <B>operator&lt;</B>(    const string&amp; left,    const string&amp; right);bool <B>operator&lt;</B>(    const string&amp; left,    const char *right);bool <B>operator&lt;</B>(    const char *left,    const string&amp; right);</PRE><P>The functions each overload <CODE>operator&lt;</CODE> tocompare two objects of class<A HREF="#string"><CODE>string</CODE></A>. All effectivelyreturn <CODE>string(left).<A HREF="#string::compare">compare</A>(right)&lt; 0</CODE>.</P><H2><A NAME="operator&lt;&lt;"><CODE>operator&lt;&lt;</CODE></A></H2><PRE>ostream&amp; <B>operator&lt;&lt;</B>(    ostream&amp; ostr,    const string&amp; str);</PRE><P>The function is a<A HREF="ostream.html#formatted output functions">formatted output functions</A>that overloads <CODE>operator&lt;&lt;</CODE> todetermine the length <CODE>len =str.<A HREF="#string::size">size</A>()</CODE>of the sequence controlled by <CODE>str</CODE>, and insert the sequence. If<CODE>len &lt; ostr.<A HREF="ios.html#ios_base::width">width</A>()</CODE>,then the function also inserts a repetition of <CODE>ostr.width() - len</CODE><A HREF="ios.html#fill character">fill characters</A>.The repetition precedes the sequence if<CODE>(ostr.<A HREF="ios.html#ios_base::flags">flags</A>() &amp;<A HREF="ios.html#ios_base::adjustfield">adjustfield</A> !=<A HREF="ios.html#ios_base::left">left</A></CODE>.Otherwise, the repetition follows the sequence.The function returns <CODE>ostr</CODE>.</P><H2><A NAME="operator&lt;="><CODE>operator&lt;=</CODE></A></H2><PRE>bool <B>operator&lt;=</B>(    const string&amp; left,    const string&amp; right);bool <B>operator&lt;=</B>(    const string&amp; left,    const char *right);bool <B>operator&lt;=</B>(    const char *left,    const string&amp; right);</PRE><P>The functions each overload <CODE>operator&lt;=</CODE> tocompare two objects of class<A HREF="#string"><CODE>string</CODE></A>. All effectivelyreturn <CODE>string(left).<A HREF="#string::compare">compare</A>(right)&lt;= 0</CODE>.</P><H2><A NAME="operator&gt;"><CODE>operator&gt;</CODE></A></H2><PRE>bool <B>operator&gt;</B>(    const string&amp; left,    const string&amp; right);bool <B>operator&gt;</B>(    const string&amp; left,    const char *right);bool <B>operator&gt;</B>(    const char *left,    const string&amp; right);</PRE><P>The functions each overload <CODE>operator&gt;</CODE> tocompare two objects of class<A HREF="#string"><CODE>string</CODE></A>. All effectivelyreturn <CODE>string(left).<A HREF="#string::compare">compare</A>(right)&gt; 0</CODE>.</P><H2><A NAME="operator&gt;="><CODE>operator&gt;=</CODE></A></H2><PRE>bool <B>operator&gt;=</B>(    const string&amp; left,    const string&amp; right);bool <B>operator&gt;=</B>(    const string&amp; left,    const char *right);bool <B>operator&gt;=</B>(    const char *left,    const string&a

⌨️ 快捷键说明

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