📄 chartrts.htm
字号:
<pre>
<a name="eq1">
Method eq()</a>
Access Public
Classification Accessor
Syntax static bool eq(const char_type& c1,const char_type& c2);
Parameters <em>c1</em> is a reference to a <a href="chartrts.htm#char-type">char_type</a>
object which is compared to the <a href="chartrts.htm#char-type">char_type</a> of c2.
<em>c2</em> is a reference to a <a href="chartrts.htm#char-type">char_type</a>
object which is compared to the <a href="chartrts.htm#char-type">char_type</a> of c1.
Returns This method returns true if c1 == c2.
</pre>
<h3>Description</h3>
<p>
The eq_int_type() method determines if <em>c1</em> == <em>c2</em>.
The <a href="chartrts.htm#char-type">char_type</a>s are compared for
equivalence.
</p>
<hr>
<a name="find">
Method find()</a>
Access Public
Classification Accessor
Syntax static const char_type* find(const char_type* s,
int n, const char_type& a);
Parameters <em>s</em> points to a sequence of characters to be searched.
<em>n</em> is the number of characters in the array to be
searched.
<em>a</em> is the character to locate.
Returns This method returns a null pointer if not successful.
</pre>
<h3>Description</h3>
<p>
The find() method finds the smallest <a href="chartrts.htm#char-type">char_type</a>
in the array <em>s</em> from <em>s</em> to <em>s</em> + <em>n</em> where
<a href="chartrts.htm#char-type">char_type</a> is equal to <em>a</em>
<a href="chartrts.htm#char-type">char_type</a>.
</p>
<hr>
<pre>
<a name="get-state">
Method get_state()</a>
Access Public
Classification Accessor
Syntax static state_type get_state(pos_type pos);
Parameters <em>pos</em> is a type <a href="chartrts.htm#pos-type">pos_type</a>.
Returns This method returns the <a href="chartrts.htm#state-type">state_type</a> of pos.
</pre>
<h3>Description</h3>
<p>
The get_state() method returns the <a href="chartrts.htm#state-type">state_type</a>
of <em>pos</em>.
</p>
<hr>
<pre>
<a name="eof">
Method eof()</a>
Access Public
Classification Accessor
Syntax static int_type eof();
Parameters None
Returns This method returns an int_type that is the
end-of-file.
</pre>
<h3>Description</h3>
<p>
The eof() method returns an int_type that is the end-of-file.
</p>
<hr>
<pre>
<a name="not-eof">
Method not_eof()</a>
Access Public
Classification Accessor
Syntax static int_type not_eof(const int_type& c);
Parameters c is the
Returns This method returns an int_type c that is not the
end-of-file.
</pre>
<h3>Description</h3>
<p>
The not_eof() method returns an <a href="chartrts.htm#int-type">int_type</a>
<em>c</em> such that <em>c</em> is not the end-of-file.
</p>
<hr>
<pre>
<a name="length">
Method length()</a>
Access Public
Classification Accessor
Syntax static size_t length(const char_type* s);
Parameters <em>s</em> points to a sequence of characters.
Returns This method returns the length of the sequence s.
</pre>
<h3>Description</h3>
<p>
The length() method returns the number of elements in character sequence.
</p>
<hr>
<pre>
<a name="lt">
Method lt()</a>
Access Public
Classification Accessor
Syntax static bool lt(const char_type& c1, const char_type& c2);
Parameters <em>c1</em> is a reference to a char_type which is compared
to c2.
<em>c2</em> is a reference to a char_type which is compared
to c1.
Returns This method returns true if c1 < c2.
</pre>
<h3>Description</h3>
<p>
The lt() method determines if <em>c1</em> < <em>c2</em>.
</p>
<hr>
<pre>
<a name="move">
Method move()</a>
Access Public
Classification Accessor
Syntax static char_type* move(char_type* s1, const char_type* s2,
size_t n);
Parameters <em>s1</em> points to a sequence of characters in which
characters from array s2 is copied.
<em>s2</em> points to a sequence of characters which
are copied to array s1.
<em>n</em> is the number of characters.
Returns This method returns s1.
</pre>
<h3>Description</h3>
<p>
The move() method moves <em>n</em> characters from <em>s2</em> to <em>s1</em>
using the assign(s[i],s2[i]). This method will work correctly even if
<em>s2</em> is in the range of <em>s1</em> + <em>n</em>.
</p>
<hr>
<pre>
<a name="to-char-type">
Method to_char_type()</a>
Access Public
Classification Accessor
Syntax static char_type to_char_type(const int_type& c);
Parameters <em>c</em> is a reference to an <a href="chartrts.htm#int-type">int_type</a> that is
to be mapped to a <a href="chartrts.htm#char-type">char_type</a>.
Returns This method returns the corresponding char_type.
</pre>
<h3>Description</h3>
<p>
The to_char_type() method maps an int_type <em>c</em> to a char_type. The corresponding
char_type is returned.
</p>
<hr>
static int_type to_int_type(const char_type& c);
<pre>
<a name="to-int-type">
Method to_int_type()</a>
Access Public
Classification Accessor
Syntax static int_type to_int_type(const char_type& c);
Parameters <em>c</em> is a reference to a <a href="chartrts.htm#char-type">char_type</a> that is
to be mapped to an <a href="chartrts.htm#int-type">int_type</a>.
Returns This method returns the corresponding int_type.
</pre>
<h3>Description</h3>
<p>
The to_int_type() method maps an char_type <em>c</em> to an int_type. The corresponding
int_type is returned.
</p>
<hr>
<a name="crd"><h2>The Class Relationship Diagram for char_traits</h2></a>
<img src="chartrat.gif">
<hr>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -