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

📄 rope.html

📁 指导程序员合理、高效的进行标准模板库编程。
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void replace(size_t i, size_t n, const rope&amp; x)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void replace(size_t i, size_t n, const charT* s, size_t n)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void replace(size_t i, size_t n, charT c)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void replace(size_t i, size_t n, const charT* s)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
void replace(size_t i, size_t n, 
             const charT* f, const charT* l)
</pre>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
void replace(size_t i, size_t n, 
             const const_iterator&amp; f,
             const const_iterator&amp; l)
</pre>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
void replace(size_t i, size_t n, 
             const iterator&amp; f,
             const iterator&amp; l)
</pre>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void replace(size_t i, charT c)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void replace(size_t i, const rope&amp; x)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void replace(size_t i, const charT* s)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void replace(size_t i, const charT* s, size_t n)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void replace(size_t i, const charT* f, const charT* l)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
void replace(size_t i, 
             const const_iterator&amp; f, const const_iterator&amp; l)
</pre>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
void replace(size_t i, 
             const iterator&amp; f, const iterator&amp; l)
</pre>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope substr(iterator f) const</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope substr(const_iterator f) const</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope substr(iterator f, iterator l) const</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope substr(const_iterator f, const_iterator l) const</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope substr(size_t i, size_t n = 1) const</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void copy(charT* buf) const</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
Copies a rope into an array of <tt>charT</tt>.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
size_type copy(size_type pos, size_type n, 
               charT* buf)
</pre>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
Copies a rope into an array of <tt>charT</tt>.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>const charT* c_str() const</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void delete_c_str()</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
See below.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope operator+(const rope&amp; L, const rope&amp;R)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
Concatenates <tt>L</tt> and <tt>R</tt>.  This is a global function, not
   a member function.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope&amp; operator+=(rope&amp; L, const rope&amp; R)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
Appends <tt>R</tt> to <tt>L</tt>.  This is a global function, not
   a member function.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope operator+(const rope&amp; L, const charT* s)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
Concatenates <tt>L</tt> and <tt>s</tt>.  This is a global function, not
   a member function.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope&amp; operator+=(rope&amp; L, const charT* s)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
Appends <tt>s</tt> to <tt>L</tt>.  This is a global function, not
   a member function.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope operator+(const rope&amp; L, charT c)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
Concatenates <tt>L</tt> and <tt>c</tt>.  This is a global function, not
   a member function.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope&amp; operator+=(rope&amp; L, charT c)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
Appends <tt>c</tt> to <tt>L</tt>.  This is a global function, not
   a member function.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>bool operator&lt;(const rope&amp;, const rope&amp;)</tt>
</TD>
<TD VAlign=top>
 <A href="ForwardContainer.html">Forward Container</A>
</TD>
<TD VAlign=top>
Lexicographical comparison.  This is a global function, not
   a member function.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>bool operator==(const rope&amp;, const rope*)</tt>
</TD>
<TD VAlign=top>
 <A href="ForwardContainer.html">Forward Container</A>
</TD>
<TD VAlign=top>
Tests two <tt>rope</tt>s for equality.  This is a global function, not
   a member function.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>ostream&amp; operator&lt;&lt;(ostream&amp; os, rope x)</tt>
</TD>
<TD VAlign=top>
<tt>rope</tt>
</TD>
<TD VAlign=top>
Outputs <tt>x</tt> to the stream <tt>os</tt>.  This is a global function, not
   a member function.
</TD>
</tr>
</table>
<h3>New members</h3>
These members are not defined in the 
<A href="RandomAccessContainer.html">Random Access Container</A> requirements, but are specific to <tt>rope</tt>:
<Table border>
<TR>
<TH>
Function
</TH>
<TH>
Description
</TH>
</TR>
<TR>
<TD VAlign=top>
<tt>rope(const charT* s)</tt>
</TD>
<TD VAlign=top>
Constructs a <tt>rope</tt> from a C string.  The rope consists of the
   sequence of characters starting with <tt>*s</tt> up to, but not including,
   the first null character.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope(const charT* s, size_t n)</tt>
</TD>
<TD VAlign=top>
Constructs a <tt>rope</tt> from an array of <tt>charT</tt>.  The rope consists of the
   characters in the range <tt>[s, s + n)</tt>.  Note that this range 
   is permitted to contain embedded null characters.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope(charT c)</tt>
</TD>
<TD VAlign=top>
Constructs a rope consisting of the single character <tt>c</tt>.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>rope(<A href="char_producer.html">char_producer</A>&lt;charT&gt;* cp, size_t n, bool destroy)</tt>
</TD>
<TD VAlign=top>
Constructs a rope of size <tt>n</tt>, whose characters are computed as
   needed by <tt>cp</tt>.  The object <tt>*cp</tt> must be valid as long as any
   reference to the resulting <tt>rope</tt>, or a <tt>rope</tt> derived from it, may
   be used.  If <tt>destroy</tt> is <tt>true</tt>, then <tt>delete cp</tt> will be executed
   automatically once <tt>cp</tt> is no longer needed.  Typically <tt>destroy</tt>
   will be <tt>true</tt> unless <tt>cp</tt> is a pointer to statically allocated
   storage.  It is rarely safe to allocate <tt>*cp</tt> on the stack.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>size_type length() const</tt>
</TD>
<TD VAlign=top>
Synonym for <tt>size</tt>
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator mutable_begin()</tt>
</TD>
<TD VAlign=top>
Returns an <tt>iterator</tt> pointing to the beginning of the <tt>rope</tt>.
   This member function exists because mutable <tt>rope</tt> iterators are
   much more expensive than constant <tt>rope</tt> iterators.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator mutable_end()</tt>
</TD>
<TD VAlign=top>
Returns an <tt>iterator</tt> pointing to the end of the <tt>rope</tt>.
   This member function exists because mutable <tt>rope</tt> iterators are
   much more expensive than constant <tt>rope</tt> iterators.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator mutable_rbegin()</tt>
</TD>
<TD VAlign=top>
Returns a <tt>reverse_iterator</tt> pointing to the beginning of the
   reversed <tt>rope</tt>.
   This member function exists because mutable <tt>rope</tt> iterators are
   much more expensive than constant <tt>rope</tt> iterators.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator mutable_rend()</tt>
</TD>
<TD VAlign=top>
Returns a <tt>reverse_iterator</tt> pointing to the end of the
   reversed <tt>rope</tt>.
   This member function exists because mutable <tt>rope</tt> iterators are
   much more expensive than constant <tt>rope</tt> iterators.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>reference mutable_reference_at(size_type n)</tt>
</TD>
<TD VAlign=top>
Returns a <tt>reference</tt> to the <tt>n</tt>th element.  This member function
   exists because mutable references to <tt>rope</tt> elements have fairly 
   high overhead.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>int compare(const rope&amp; x)</tt>
</TD>
<TD VAlign=top>
Three-way comparison, much like the function <tt>strcmp</tt> from the
   standard C library.  Returns a negative number if <tt>*this</tt> is
   lexicographically less than <tt>x</tt>, a positive number if <tt>*this</tt>
   is lexicographically greater than <tt>x</tt>, and zero if neither 
   <tt>rope</tt> is lexicographically less than the other.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator insert(const iterator&amp; p, const rope&amp; x)</tt>
</TD>
<TD VAlign=top>
Inserts the contents of the <tt>rope</tt> <tt>x</tt> immediately before the
   position <tt>p</tt>.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator insert(const iterator&amp; p, const charT* s)</tt>
</TD>
<TD VAlign=top>
Inserts a C string immediately before the position <tt>p</tt>.  The
   elements that are inserted are the sequence of characters
   starting with <tt>*s</tt> and up to, but not including, the first
   null character.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>iterator insert(const iterator&amp; p, const charT* s, size_t n)</tt>
</TD>
<TD VAlign=top>
Inserts an array of <tt>charT</tt>.  The elements that are inserted
   are the range <tt>[s, s + n)</tt>.  Note that this range is permitted
   to contain embedded null characters.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void insert(size_t i, const rope&amp; x)</tt>
</TD>
<TD VAlign=top>
Inserts the contents of the <tt>rope</tt> x immediately before the <tt>i</tt>th
   element.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void insert(size_t i, size_t n, charT c)</tt>
</TD>
<TD VAlign=top>
Inserts <tt>n</tt> copies of <tt>c</tt> immediately before the <tt>i</tt>th element.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void insert(size_t i, const charT* s)</tt>
</TD>
<TD VAlign=top>
Inserts a C string immediately before the <tt>i</tt>th element.  The
   elements that are inserted are the sequence of characters
   starting with <tt>*s</tt> and up to, but not including, the first
   null character.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void insert(size_t i, const charT* s, size_t n)</tt>
</TD>
<TD VAlign=top>
Inserts an array of <tt>charT</tt> immediately before the <tt>i</tt>th element.  The
   elements that are inserted are the range <tt>[s, s + n)</tt>.  Note 
   that this range is permitted to contain embedded null characters.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void insert(size_t i, charT c)</tt>
</TD>
<TD VAlign=top>
Inserts the character <tt>c</tt> immediately before the <tt>i</tt>th element.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void insert(size_t i)</tt>
</TD>
<TD VAlign=top>
Inserts the character <tt>charT()</tt> immediately before the <tt>i</tt>th element.
</TD>
</TR>
<TR>
<TD VAlign=top>
<tt>void insert(size_t i, const charT* f, const charT* l)</tt>
</TD>
<TD VAlign=top>
Inserts the range <tt>[f, l)</tt> immediately before the <tt>i</tt>th element.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>
void insert(size_t i, 
            const const_iterator&amp; f, const const_iterator&amp; l)
</pre>
</TD>
<TD VAlign=top>
Inserts the range <tt>[f, l)</tt> immediately  before the <tt>i</tt>th element.
</TD>
</TR>
<TR>
<TD VAlign=top>
<pre>

⌨️ 快捷键说明

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