blob: a0891b9884e779a634a15ac0c11f6e98b41d9d80 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
<h1 id="firstHeading" class="firstHeading">wctype</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code><wctype.h></code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl"> <td> <pre data-language="c">wctype_t wctype( const char* str );</pre>
</td> <td class="t-dcl-nopad"> </td> <td> <span class="t-mark-rev t-since-c95">(since C95)</span> </td> </tr> </table> <p>Constructs a value of type <code>wctype_t</code> that describes a <code><a href="../../locale/lc_categories" title="c/locale/LC categories">LC_CTYPE</a></code> category of wide character classification. It may be one of the standard classification categories, or a locale-specific category, such as <code>"jkanji"</code>.</p>
<h3 id="Parameters"> Parameters</h3> <table class="t-par-begin"> <tr class="t-par"> <td> str </td> <td> - </td> <td> C string holding the name of the desired category </td>
</tr>
</table> <p>The following values of <code>str</code> are supported in all C locales:</p>
<table class="t-dsc-begin"> <tr class="t-dsc-hitem"> <th> value of <code>str</code> </th> <th> effect </th>
</tr> <tr class="t-dsc"> <td> <code>"alnum"</code> </td> <td> identifies the category used by <code><a href="iswalnum" title="c/string/wide/iswalnum">iswalnum</a></code> </td>
</tr> <tr class="t-dsc"> <td> <code>"alpha"</code> </td> <td> identifies the category used by <code><a href="iswalpha" title="c/string/wide/iswalpha">iswalpha</a></code> </td>
</tr> <tr class="t-dsc"> <td> <code>"blank"</code> </td> <td> identifies the category used by <code><a href="iswblank" title="c/string/wide/iswblank">iswblank</a></code> <span class="t-mark-rev t-since-c99">(C99)</span> </td>
</tr> <tr class="t-dsc"> <td> <code>"cntrl"</code> </td> <td> identifies the category used by <code><a href="iswcntrl" title="c/string/wide/iswcntrl">iswcntrl</a></code> </td>
</tr> <tr class="t-dsc"> <td> <code>"digit"</code> </td> <td> identifies the category used by <code><a href="iswdigit" title="c/string/wide/iswdigit">iswdigit</a></code> </td>
</tr> <tr class="t-dsc"> <td> <code>"graph"</code> </td> <td> identifies the category used by <code><a href="iswgraph" title="c/string/wide/iswgraph">iswgraph</a></code> </td>
</tr> <tr class="t-dsc"> <td> <code>"lower"</code> </td> <td> identifies the category used by <code><a href="iswlower" title="c/string/wide/iswlower">iswlower</a></code> </td>
</tr> <tr class="t-dsc"> <td> <code>"print"</code> </td> <td> identifies the category used by <code><a href="iswprint" title="c/string/wide/iswprint">iswprint</a></code> </td>
</tr> <tr class="t-dsc"> <td> <code>"space"</code> </td> <td> identifies the category used by <code><a href="iswspace" title="c/string/wide/iswspace">iswspace</a></code> </td>
</tr> <tr class="t-dsc"> <td> <code>"upper"</code> </td> <td> identifies the category used by <code><a href="iswupper" title="c/string/wide/iswupper">iswupper</a></code> </td>
</tr> <tr class="t-dsc"> <td> <code>"xdigit"</code> </td> <td> identifies the category used by <code><a href="iswxdigit" title="c/string/wide/iswxdigit">iswxdigit</a></code> </td>
</tr> </table> <h3 id="Return_value"> Return value</h3> <p><code>wctype_t</code> object suitable for use with <code><a href="iswctype" title="c/string/wide/iswctype">iswctype</a></code> to classify wide characters according to the named category of the current C locale or zero if <code>str</code> does not name a category supported by the current C locale.</p>
<h3 id="References"> References</h3> <ul>
<li> C23 standard (ISO/IEC 9899:2023): </li>
<ul><li> 7.30.2.2.2 The wctype function (p: TBD) </li></ul>
<li> C17 standard (ISO/IEC 9899:2018): </li>
<ul><li> 7.30.2.2.2 The wctype function (p: TBD) </li></ul>
<li> C11 standard (ISO/IEC 9899:2011): </li>
<ul><li> 7.30.2.2.2 The wctype function (p: 452) </li></ul>
<li> C99 standard (ISO/IEC 9899:1999): </li>
<ul><li> 7.25.2.2.2 The wctype function (p: 398) </li></ul>
</ul> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td> <div><a href="iswctype" title="c/string/wide/iswctype"> <span class="t-lines"><span>iswctype</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c95">(C95)</span></span></span></div> </td> <td> classifies a wide character according to the specified <code><a href="../../locale/lc_categories" title="c/locale/LC categories">LC_CTYPE</a></code> category <br> <span class="t-mark">(function)</span> </td>
</tr> <tr class="t-dsc"> <td colspan="2"> <span><a href="https://en.cppreference.com/w/cpp/string/wide/wctype" title="cpp/string/wide/wctype">C++ documentation</a></span> for <code>wctype</code> </td>
</tr> </table> <div class="_attribution">
<p class="_attribution-p">
© cppreference.com<br>Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.<br>
<a href="https://en.cppreference.com/w/c/string/wide/wctype" class="_attribution-link">https://en.cppreference.com/w/c/string/wide/wctype</a>
</p>
</div>
|