diff options
| author | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-08-14 22:58:58 -0500 |
| commit | 82ba818ff456bcd6d56a06226e3f27e98fbb55c3 (patch) | |
| tree | 158cfc17b2f644a10f063cb546752cfaae12c97f /devdocs/c/string%2Fmultibyte%2Fchar8_t.html | |
| parent | 9278ddd4ea1a8b1a4c1edaa8894516e3f48d245b (diff) | |
| download | dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.tar.gz dotemacs-82ba818ff456bcd6d56a06226e3f27e98fbb55c3.zip | |
removing all downloaded devdocs files
Diffstat (limited to 'devdocs/c/string%2Fmultibyte%2Fchar8_t.html')
| -rw-r--r-- | devdocs/c/string%2Fmultibyte%2Fchar8_t.html | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/devdocs/c/string%2Fmultibyte%2Fchar8_t.html b/devdocs/c/string%2Fmultibyte%2Fchar8_t.html deleted file mode 100644 index 56ae4d71..00000000 --- a/devdocs/c/string%2Fmultibyte%2Fchar8_t.html +++ /dev/null @@ -1,24 +0,0 @@ - <h1 id="firstHeading" class="firstHeading">char8_t</h1> <table class="t-dcl-begin"> <tr class="t-dsc-header"> <th> Defined in header <code><uchar.h></code> </th> <th> </th> <th> </th> </tr> <tr class="t-dcl t-since-c23"> <td> <pre data-language="c">typedef unsigned char char8_t;</pre> -</td> <td class="t-dcl-nopad"> </td> <td> <span class="t-mark-rev t-since-c23">(since C23)</span> </td> </tr> </table> <p><code>char8_t</code> is an unsigned integer type used for UTF-8 and is the same type as <code>unsigned char</code>.</p> -<h3 id="Example"> Example</h3> <div class="t-example"> <div class="c source-c"><pre data-language="c">#include <uchar.h> -#include <stdio.h> - -int main(void) -{ - char8_t str[] = u8"zß水🍌"; // or "z\u00df\u6c34\U0001f34c" - size_t str_sz = sizeof str; // sizeof *str == 1 by definition - printf("%zu UTF-8 code units: [ ", str_sz); - for (size_t n = 0; n < str_sz; ++n) - printf("%02X ", str[n]); - printf("]\n"); -}</pre></div> <p>Possible output:</p> -<div class="text source-text"><pre data-language="c">11 UTF-8 code units: [ 7A C3 9F E6 B0 B4 F0 9F 8D 8C 00 ]</pre></div> </div> <h3 id="References"> References</h3> <ul> -<li> C23 standard (ISO/IEC 9899:2023): </li> -<ul><li> 7.30 Unicode utilities <uchar.h> (p: 410) </li></ul> -</ul> <h3 id="See_also"> See also</h3> <table class="t-dsc-begin"> <tr class="t-dsc"> <td colspan="2"> <span><a href="https://en.cppreference.com/w/cpp/language/types" title="cpp/language/types">C++ documentation</a></span> for <code>Fundamental types</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/multibyte/char8_t" class="_attribution-link">https://en.cppreference.com/w/c/string/multibyte/char8_t</a> - </p> -</div> |
