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

📄 ctype.htm

📁 这是关于VC++中的STL容器的资料,包括了STL容器各个类之间关系以及类的说明
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<html>
<head>
<title>ctype</title>
<head>

<body bgcolor="#FFFFFF">

<a name="here"></a>


<img src="ctypban.gif">

<pre>

<font size=5>Class Name</font>            ctype

<font size=5>Header File</font>          &lt;locale&gt;

<font size=5>Classification</font>      abstract data type

</pre>

<a href="ctype.htm#crd">Class Relationship Diagram</a><br>
<br>
<a href="ctype.htm#class-descrip">Class Description</a>

<h1>Member Classes</h1>
<a href="ctype.htm#id">locale::id</a>

<h1>Methods</h1>
<pre>
<a href="ctype.htm#ctype">
explicit ctype(size_t refs = 0);</a>

<a href="ctype.htm#~ctype">
~ctype();</a>

<a href="ctype.htm#do-is1">
virtual bool do_is(mask m, charT c) const;</a>

<a href="ctype.htm#do-is2">
virtual const charT* do_is(const charT* low, const charT* high,
mask* vec) const;</a>

<a href="ctype.htm#do-scan-is">
virtual const charT* do_scan_is(mask m, const charT* low,
const charT* high) const;</a>

<a href="ctype.htm#do-scan-not">
virtual const charT* do_scan_not(mask m, const charT* low,
const charT* high) const;</a>

<a href="ctype.htm#do-narrow1">
virtual char do_narrow(charT, char dfault) const;</a>

<a href="ctype.htm#do-narrow2">
virtual const charT* do_narrow(const charT* low, const charT* high,
char dfault, char* dest) const;</a>

<a href="ctype.htm#do-tolower1">
virtual charT do_tolower(charT c) const;</a>

<a href="ctype.htm#do-tolower2">
virtual const charT* do_tolower(charT* low, const charT* high) const;</a>

<a href="ctype.htm#do-toupper1">
virtual charT do_toupper(charT c) const;</a>

<a href="ctype.htm#do-toupper2">
virtual const charT* do_toupper(charT* low, const charT* high) const;</a>

<a href="ctype.htm#do-widen1">
virtual charT do_widen(char) const;</a>

<a href="ctype.htm#do-widen2">
virtual const char* do_widen(const char* low, const char* high,
charT* dest) const;</a>

<a href="ctype.htm#is1">
bool is(mask m, charT c) const;</a>

<a href="ctype.htm#is2">
const charT* is(const charT* low, const charT* high, mask* vec) const;</a>

<a href="ctype.htm#narrow1">
char narrow(charT c, char dfault) const;</a>

<a href="ctype.htm#narrow2">
const charT* narrow(const charT* low, const charT*, char dfault,
char* to) const;</a>

<a href="ctype.htm#scan-is">
const charT* scan_is(mask m, const charT* low, const charT* high) const;</a>

<a href="ctype.htm#scan-not">
const charT* scan_not(mask m, const charT* low, const charT* high) const;</a>

<a href="ctype.htm#tolower1">
charT tolower(charT c) const;</a>

<a href="ctype.htm#tolower2">
const charT* tolower(charT* low, const charT* high) const;</a>

<a href="ctype.htm#toupper1">
charT toupper(charT) const;</a>

<a href="ctype.htm#toupper2">
const charT* toupper(charT* low, const charT* high) const;</a>

<a href="ctype.htm#widen1">
charT widen(char c) const;</a>

<a href="ctype.htm#widen2">
const char* widen(const char* low, const char* high, charT* to) const;</a>

</pre>
<hr>
<a name="class-descrip"><h3>Class Description</h3></a>
<p>
The ctype template class describes a class used to provide character classifications
and simple conversions.
</p>
<hr>
<a name="id"><h3>locale::id</h3></a>
<p>
locale::id is a class used to provide an identification of a locale facet interfaces used as
an index for lookup and to encapsulate initialization.
</p>
<hr>

<pre>
<a name="ctype">
Method             ctype()</a>

Access             Public

Classification     Constructor

Syntax             explicit ctype(size_t refs = 0);

Parmeters          <em>refs</em>, if the refs argument = 0 then the destruction
                   of the object is delegated to the locale or locales
                   which contain it. If refs = 1 then the object must
                   be explicitly deleted. The locale will not delete it.
                   The object can then be maintained across the lifetime
                   of multiple locales.
          
Returns            None

</pre>

<h3>Description</h3>
<p>
This constructor constructs a ctype facet object.
</p>
<hr>

<pre>
<a name="~ctype">
Method             ctype()</a>

Access             Protected

Classification     Destructor

Syntax             ~ctype();

Parmeters          None

Returns            None

</pre>

<h3>Description</h3>
<p>
The destructor destroys a ctype facet object.
</p>
<hr>

<pre>
<a name="do-is1">
Method             do_is()</a>

Access             Protected

Classification     Accessor

Syntax             virtual bool do_is(mask m, charT c) const;

Parameters         <em>m</em> is one of the mask available from the ctype_base.

                   <em>c</em> is the character to be classified.

Return             This method returns true if the character matches the 
                   classification indicated by the mask.

</pre>

<h3>Description</h3>
<p>
The do_is() method classifies a character. The method determines if the character
matches the classification indicated by the mask argument <em>m</em>. It returns
true if the character matches the classification indicated by the mask. 
</p>
<hr>

<pre>
<a name="do-is2">
Method             do_is()</a>

Access             Protected

Classification     Accessor

Syntax             virtual const charT* do_is(const charT* low, 
                                              const charT* high, 
                                              mask* vec) const;

Parameters         <em>low</em> is the beginning of a sequence of characters.

                   <em>high</em> is the end of a sequence of characters.

                   <em>vec</em> is a vector of masks.

Return             This method returns the high argument.

</pre>

<h3>Description</h3>
<p>
The do_is() method classifies a sequence of characters. The method fills <em>vec</em> with
every mask from the ctype_base and applies it to the sequence of characters in the
range [low, high).
</p>
<hr>

<pre>
<a name="do-scan-is">
Method             do_scan_is()</a>

Access             Protected

Classification     Accessor

Syntax             virtual const charT* do_scan_is(mask m, 
                                                   const charT* low, 
                                                   const charT* high) const;

Parameters         <em>m</em> is one of the mask available from the ctype_base.


                   <em>low</em> is the beginning of a sequence of characters.

                   <em>high</em> is the end of a sequence of characters.


Returns            This method returns the first character in the
                   range that matches the classification indicated
                   by the mask m.

</pre>

<h3>Description</h3>
<p>
The do_scan_is() method locates a character in the range [low, high) that
conforms to the classification indicated by the mask argument <em>m</em>.
This method returns the first character in the range that matches the 
classification indicated by the mask <em>m</em>. If the character is not in
the range <em>high</em> is returned.
</p>

<hr>

<pre>
<a name="do-scan-not">
Method             do_scan_not()</a>

Access             Protected

Classification     Accessor

Syntax             virtual const charT* do_scan_not(mask m,
                                                    const charT* low,
                                                    const charT* high) const;

Parameters         <em>m</em> is one of the mask available from the ctype_base.


                   <em>low</em> is the beginning of a sequence of characters.

                   <em>high</em> is the end of a sequence of characters.


Returns            This method returns the first character in the
                   range that does not match the classification 
                   indicated by the mask m.

</pre>

<h3>Description</h3>
<p>
The do_scan_is() method locates a character in the range [low, high) that
does not conform to the classification indicated by the mask argument <em>m</em>.
This method returns the first character in the range that does not match the
classification indicated by the mask <em>m</em>. If the character is not in
the range <em>high</em> is returned.
</p>

<hr>

<pre>
<a name="do-narrow1">
Method             do_narrow()</a>

Access             Protected

Classification     Modifier

Syntax             virtual char do_narrow(charT c, char dfault) const;

Parameters         <em>c</em> is the character to be transformed.

                   <em>dfault</em> is character that is returned if no
                   transformation takes places.

Returns            This method returns the transformed value or 
                   dfault if no transformation takes place.

</pre>

<h3>Description</h3>
<p>
The do_narrow() method applies the simplest transformation from a charT value
to the corresponding char value if it exist. The method returns the transformed
value or returns the <em>dfault</em> argument if no transformation is possible.
</p>
<hr>

<pre>
<a name="do-narrow2">
Method             do_narrow()</a>

Access             Protected

Classification     Modifier

Syntax             virtual const charT* do_narrow(const charT* low, 
                                                  const charT* high, 
                                                  char dfault, 
                                                  char* dest) const;

Parameters         <em>low</em> is the beginning of a sequence of 
                   characters.

                   <em>high</em> is the end of a sequence of 
                   characters.

                   <em>dfault</em> is used as a default transformation.

                   <em>dest</em> is the destination of the results.

Returns            This method returns high.

</pre>
              

<h3>Description</h3>
<p>
The do_narrow() method applies the simplest transformation from a sequence of charT 
values to the corresponding char values if they exist. If no simple transformation
is possible then <em>dfault</em> is used. The method returns the transformed
values in <em>dest</em> argument.
</p>
<hr>

<pre>
<a name="do-tolower1">
Method             do_tolower()</a>

Access             Protected

Classification     Modifier

Syntax             virtual charT do_tolower(charT c) const;

Parameters         <em>c</em> is the character to be converted.

Returns            This method returns the converted character.

</pre>

<h3>Description</h3>
<p>
The do_tolower() method converts the character argument <em>c</em> to
lower case. The method returns the converted character. If no conversion is
possible the argument is returned.
</p>
<hr>

<pre>
<a name="do-tolower2">
Method             do_tolower()</a>

Access             Protected

Classification     Modifier

Syntax             virtual charT do_tolower(charT* low, 
                                            const charT* high) const;

Parameters         <em>low</em> is the beginning of a sequence of 
                   characters.

                   <em>high</em> is the end of a sequence of 
                   characters.


Returns            This method returns high.

</pre>

<h3>Description</h3>
<p>
The do_tolower() method converts each character in the character sequence
[low, high) argument to lower case. Each character in the range is replaced 
with the lower case character. The method returns <em>high</em>.
</p>
<hr>

<pre>
<a name="do-toupper1">
Method             do_toupper()</a>

Access             Protected

Classification     Modifier

Syntax             virtual charT do_toupper(charT c) const;

⌨️ 快捷键说明

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