summaryrefslogtreecommitdiff
path: root/devdocs/c/string%2Fwide%2Ftowctrans.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/c/string%2Fwide%2Ftowctrans.html')
-rw-r--r--devdocs/c/string%2Fwide%2Ftowctrans.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/devdocs/c/string%2Fwide%2Ftowctrans.html b/devdocs/c/string%2Fwide%2Ftowctrans.html
new file mode 100644
index 00000000..36a38b2b
--- /dev/null
+++ b/devdocs/c/string%2Fwide%2Ftowctrans.html
@@ -0,0 +1,39 @@
+ <h1 id="firstHeading" class="firstHeading">towctrans</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code>&lt;wctype.h&gt;</code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl"> <td> <pre data-language="c">wint_t towctrans( wint_t wc, wctrans_t desc );</pre>
+</td> <td class="t-dcl-nopad"> </td> <td> <span class="t-mark-rev t-since-c95">(since C95)</span> </td> </tr> </table> <p>Maps the wide character <code>wc</code> using the current C locale's <code><a href="../../locale/lc_categories" title="c/locale/LC categories">LC_CTYPE</a></code> mapping category identified by <code>desc</code>.</p>
+<h3 id="Parameters"> Parameters</h3> <table class="t-par-begin"> <tr class="t-par"> <td> wc </td> <td> - </td> <td> the wide character to map </td>
+</tr> <tr class="t-par"> <td> desc </td> <td> - </td> <td> the <code><a href="../../locale/lc_categories" title="c/locale/LC categories">LC_CTYPE</a></code> mapping, obtained from a call to <code><a href="wctrans" title="c/string/wide/wctrans">wctrans</a></code> </td>
+</tr>
+</table> <h3 id="Return_value"> Return value</h3> <p>The mapped value of <code>wc</code> using the mapping identified by <code>desc</code> in <code><a href="../../locale/lc_categories" title="c/locale/LC categories">LC_CTYPE</a></code> facet of the current C locale.</p>
+<h3 id="Example"> Example</h3> <div class="t-example"> <div class="c source-c"><pre data-language="c">#include &lt;locale.h&gt;
+#include &lt;wctype.h&gt;
+#include &lt;wchar.h&gt;
+#include &lt;stdio.h&gt;
+
+int main(void)
+{
+ setlocale(LC_ALL, "ja_JP.UTF-8");
+ const wchar_t kana[] = L"ヒラガナ";
+ size_t sz = sizeof kana / sizeof *kana;
+ wchar_t hira[sz];
+ for (size_t n = 0; n &lt; sz; ++n)
+ hira[n] = towctrans(kana[n], wctrans("tojhira"));
+ printf("katakana characters %ls are %ls in hiragana\n", kana, hira);
+}</pre></div> <p>Output:</p>
+<div class="text source-text"><pre data-language="c">katakana characters ヒラガナ are ひらがな in hiragana</pre></div> </div> <h3 id="References"> References</h3> <ul>
+<li> C23 standard (ISO/IEC 9899:2023): </li>
+<ul><li> 7.30.3.2.1 The towctrans function (p: TBD) </li></ul>
+<li> C17 standard (ISO/IEC 9899:2018): </li>
+<ul><li> 7.30.3.2.1 The towctrans function (p: TBD) </li></ul>
+<li> C11 standard (ISO/IEC 9899:2011): </li>
+<ul><li> 7.30.3.2.1 The towctrans function (p: 454) </li></ul>
+<li> C99 standard (ISO/IEC 9899:1999): </li>
+<ul><li> 7.25.3.2,1 The towctrans function (p: 400) </li></ul>
+</ul> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td> <div><a href="wctrans" title="c/string/wide/wctrans"> <span class="t-lines"><span>wctrans</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> looks up a character mapping category in the current C locale <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/towctrans" title="cpp/string/wide/towctrans">C++ documentation</a></span> for <code>towctrans</code> </td>
+</tr> </table> <div class="_attribution">
+ <p class="_attribution-p">
+ &copy; 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/towctrans" class="_attribution-link">https://en.cppreference.com/w/c/string/wide/towctrans</a>
+ </p>
+</div>