summaryrefslogtreecommitdiff
path: root/devdocs/c/string%2Fbyte.html
blob: 154cff0a3cfeb4ca7ae3666a2a35c119c45ed648 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
    <h1 id="firstHeading" class="firstHeading">Null-terminated byte strings</h1>            <p>A null-terminated byte string (NTBS) is a sequence of nonzero bytes followed by a byte with value zero (the terminating null character). Each byte in a byte string encodes one character of some character set. For example, the character array <code>{'\x63','\x61','\x74','\0'}</code> is an NTBS holding the string <code>"cat"</code> in <a href="../language/ascii" title="c/language/ascii">ASCII</a> encoding.</p>
<h3 id="Functions"> Functions</h3> <table class="t-dsc-begin"> <tr> <td colspan="2"> <h5 id="Character_classification">  Character classification </h5> </td>
</tr> <tr class="t-dsc-header"> <th colspan="2"> Defined in header <code>&lt;ctype.h&gt;</code>  </th>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/isalnum" title="c/string/byte/isalnum"> <span class="t-lines"><span>isalnum</span></span></a></div> </td> <td> checks if a character is alphanumeric <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/isalpha" title="c/string/byte/isalpha"> <span class="t-lines"><span>isalpha</span></span></a></div> </td> <td> checks if a character is alphabetic <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/islower" title="c/string/byte/islower"> <span class="t-lines"><span>islower</span></span></a></div> </td> <td> checks if a character is lowercase <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/isupper" title="c/string/byte/isupper"> <span class="t-lines"><span>isupper</span></span></a></div> </td> <td> checks if a character is an uppercase character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/isdigit" title="c/string/byte/isdigit"> <span class="t-lines"><span>isdigit</span></span></a></div> </td> <td> checks if a character is a digit <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/isxdigit" title="c/string/byte/isxdigit"> <span class="t-lines"><span>isxdigit</span></span></a></div> </td> <td> checks if a character is a hexadecimal character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/iscntrl" title="c/string/byte/iscntrl"> <span class="t-lines"><span>iscntrl</span></span></a></div> </td> <td> checks if a character is a control character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/isgraph" title="c/string/byte/isgraph"> <span class="t-lines"><span>isgraph</span></span></a></div> </td> <td> checks if a character is a graphical character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/isspace" title="c/string/byte/isspace"> <span class="t-lines"><span>isspace</span></span></a></div> </td> <td> checks if a character is a space character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/isblank" title="c/string/byte/isblank"> <span class="t-lines"><span>isblank</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c99">(C99)</span></span></span></div> </td> <td> checks if a character is a blank character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/isprint" title="c/string/byte/isprint"> <span class="t-lines"><span>isprint</span></span></a></div> </td> <td> checks if a character is a printing character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/ispunct" title="c/string/byte/ispunct"> <span class="t-lines"><span>ispunct</span></span></a></div> </td> <td> checks if a character is a punctuation character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr> <td colspan="2"> <h5 id="Character_manipulation">  Character manipulation </h5> </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/tolower" title="c/string/byte/tolower"> <span class="t-lines"><span>tolower</span></span></a></div> </td> <td> converts a character to lowercase <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/toupper" title="c/string/byte/toupper"> <span class="t-lines"><span>toupper</span></span></a></div> </td> <td> converts a character to uppercase <br> <span class="t-mark">(function)</span>  </td>
</tr> </table> <p>Note: additional functions whose names begin with either <code>to</code> or <code>is</code>, followed by a lowercase letter, may be added to the header <code>ctype.h</code> in future and should not be defined by programs that include that header.</p>
<table class="wikitable"> <tr> <th colspan="3"> ASCII values </th> <th rowspan="2"> characters </th> <th rowspan="2"> <p><a href="byte/iscntrl" title="c/string/byte/iscntrl"><code>iscntrl</code></a><br> <a href="wide/iswcntrl" title="c/string/wide/iswcntrl"><code>iswcntrl</code></a></p>
</th> <th rowspan="2"> <p><a href="byte/isprint" title="c/string/byte/isprint"><code>isprint</code></a><br> <a href="wide/iswprint" title="c/string/wide/iswprint"><code>iswprint</code></a></p>
</th> <th rowspan="2"> <p><a href="byte/isspace" title="c/string/byte/isspace"><code>isspace</code></a><br> <a href="wide/iswspace" title="c/string/wide/iswspace"><code>iswspace</code></a></p>
</th> <th rowspan="2"> <p><a href="byte/isblank" title="c/string/byte/isblank"><code>isblank</code></a><br> <a href="wide/iswblank" title="c/string/wide/iswblank"><code>iswblank</code></a></p>
</th> <th rowspan="2"> <p><a href="byte/isgraph" title="c/string/byte/isgraph"><code>isgraph</code></a><br> <a href="wide/iswgraph" title="c/string/wide/iswgraph"><code>iswgraph</code></a></p>
</th> <th rowspan="2"> <p><a href="byte/ispunct" title="c/string/byte/ispunct"><code>ispunct</code></a> <br> <a href="wide/iswpunct" title="c/string/wide/iswpunct"><code>iswpunct</code></a></p>
</th> <th rowspan="2"> <p><a href="byte/isalnum" title="c/string/byte/isalnum"><code>isalnum</code></a> <br> <a href="wide/iswalnum" title="c/string/wide/iswalnum"><code>iswalnum</code></a></p>
</th> <th rowspan="2"> <p><a href="byte/isalpha" title="c/string/byte/isalpha"><code>isalpha</code></a> <br> <a href="wide/iswalpha" title="c/string/wide/iswalpha"><code>iswalpha</code></a></p>
</th> <th rowspan="2"> <p><a href="byte/isupper" title="c/string/byte/isupper"><code>isupper</code></a><br> <a href="wide/iswupper" title="c/string/wide/iswupper"><code>iswupper</code></a></p>
</th> <th rowspan="2"> <p><a href="byte/islower" title="c/string/byte/islower"><code>islower</code></a><br> <a href="wide/iswlower" title="c/string/wide/iswlower"><code>iswlower</code></a></p>
</th> <th rowspan="2"> <p><a href="byte/isdigit" title="c/string/byte/isdigit"><code>isdigit</code></a><br> <a href="wide/iswdigit" title="c/string/wide/iswdigit"><code>iswdigit</code></a></p>
</th> <th rowspan="2"> <p><a href="byte/isxdigit" title="c/string/byte/isxdigit"><code>isxdigit</code></a><br> <a href="wide/iswxdigit" title="c/string/wide/iswxdigit"><code>iswxdigit</code></a></p>
</th>
</tr> <tr> <th> decimal </th> <th> hexadecimal </th> <th> octal </th>
</tr> <tr> <td> 0–8 </td> <td> <code>\x0</code>–<code>\x8</code> </td> <td> <code>\0</code>–<code>\10</code> </td> <td> control codes (<code>NUL</code>, etc.) </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr> <tr> <td> 9 </td> <td> <code>\x9</code> </td> <td> <code>\11</code> </td> <td> tab (<code>\t</code>) </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr> <tr> <td> 10–13 </td> <td> <code>\xA</code>–<code>\xD</code> </td> <td> <code>\12</code>–<code>\15</code> </td> <td> whitespaces (<code>\n</code>, <code>\v</code>, <code>\f</code>, <code>\r</code>) </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr> <tr> <td> 14–31 </td> <td> <code>\xE</code>–<code>\x1F</code> </td> <td> <code>\16</code>–<code>\37</code> </td> <td> control codes </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr> <tr> <td> 32 </td> <td> <code>\x20</code> </td> <td> <code>\40</code> </td> <td> space </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr> <tr> <td> 33–47 </td> <td> <code>\x21</code>–<code>\x2F</code> </td> <td> <code>\41</code>–<code>\57</code> </td> <td> <code>!"#$%&amp;'()*+,-./</code> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr> <tr> <td> 48–57 </td> <td> <code>\x30</code>–<code>\x39</code> </td> <td> <code>\60</code>–<code>\71</code> </td> <td> <code>0123456789</code> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td>
</tr> <tr> <td> 58–64 </td> <td> <code>\x3A</code>–<code>\x40</code> </td> <td> <code>\72</code>–<code>\100</code> </td> <td> <code>:;&lt;=&gt;?@</code> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr> <tr> <td> 65–70 </td> <td> <code>\x41</code>–<code>\x46</code> </td> <td> <code>\101</code>–<code>\106</code> </td> <td> <code>ABCDEF</code> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td>
</tr> <tr> <td> 71–90 </td> <td> <code>\x47</code>–<code>\x5A</code> </td> <td> <code>\107</code>–<code>\132</code> </td> <td> <code>GHIJKLMNOP</code><br><code>QRSTUVWXYZ</code> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr> <tr> <td> 91–96 </td> <td> <code>\x5B</code>–<code>\x60</code> </td> <td> <code>\133</code>–<code>\140</code> </td> <td> <code>[\]^_`</code> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr> <tr> <td> 97–102 </td> <td> <code>\x61</code>–<code>\x66</code> </td> <td> <code>\141</code>–<code>\146</code> </td> <td> <code>abcdef</code> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td>
</tr> <tr> <td> 103–122 </td> <td> <code>\x67</code>–<code>\x7A</code> </td> <td> <code>\147</code>–<code>\172</code> </td> <td> <code>ghijklmnop</code><br><code>qrstuvwxyz</code> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr> <tr> <td> 123–126 </td> <td> <code>\x7B</code>–<code>\x7E</code> </td> <td> <code>\172</code>–<code>\176</code> </td> <td> <code>{|}~</code> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr> <tr> <td> 127 </td> <td> <code>\x7F</code> </td> <td> <code>\177</code> </td> <td> backspace character (<code>DEL</code>) </td> <td class="table-yes">
<b><code>≠0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td> <td class="table-no"> <b><code>0</code></b> </td>
</tr>
</table> <table class="t-dsc-begin"> <tr> <td colspan="2"> <h5 id="Conversions_to_and_from_numeric_formats">  Conversions to and from numeric formats </h5> </td>
</tr> <tr class="t-dsc-header"> <th colspan="2"> Defined in header <code>&lt;stdlib.h&gt;</code>  </th>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/atof" title="c/string/byte/atof"> <span class="t-lines"><span>atof</span></span></a></div> </td> <td> converts a byte string to a floating-point value <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/atoi" title="c/string/byte/atoi"> <span class="t-lines"><span>atoi</span><span>atol</span><span>atoll</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c99">(C99)</span></span></span></div> </td> <td> converts a byte string to an integer value <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strtol" title="c/string/byte/strtol"> <span class="t-lines"><span>strtol</span><span>strtoll</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c99">(C99)</span></span></span></div> </td> <td> converts a byte string to an integer value <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strtoul" title="c/string/byte/strtoul"> <span class="t-lines"><span>strtoul</span><span> strtoull</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c99">(C99)</span></span></span></div> </td> <td> converts a byte string to an unsigned integer value <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strtof" title="c/string/byte/strtof"> <span class="t-lines"><span>strtof</span><span>strtod</span><span>strtold</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c99">(C99)</span></span><span><span class="t-mark-rev t-since-c99">(C99)</span></span></span></div> </td> <td> converts a byte string to a floating point value <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strfromf" title="c/string/byte/strfromf"> <span class="t-lines"><span>strfromf</span><span>strfromd</span><span>strfromld</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c23">(C23)</span></span><span><span class="t-mark-rev t-since-c23">(C23)</span></span><span><span class="t-mark-rev t-since-c23">(C23)</span></span></span></div> </td> <td> converts a floating point value to a byte string <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc-header"> <th colspan="2"> Defined in header <code>&lt;inttypes.h&gt;</code>  </th>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strtoimax" title="c/string/byte/strtoimax"> <span class="t-lines"><span>strtoimax</span><span>strtoumax</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c99">(C99)</span></span><span><span class="t-mark-rev t-since-c99">(C99)</span></span></span></div> </td> <td> converts a byte string to <code><a href="../types/integer" title="c/types/integer">intmax_t</a></code> or <code><a href="../types/integer" title="c/types/integer">uintmax_t</a></code> <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr> <td colspan="2"> <h5 id="String_manipulation">  String manipulation </h5> </td>
</tr> <tr class="t-dsc-header"> <th colspan="2"> Defined in header <code>&lt;string.h&gt;</code>  </th>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strcpy" title="c/string/byte/strcpy"> <span class="t-lines"><span>strcpy</span><span>strcpy_s</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div> </td> <td> copies one string to another <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strncpy" title="c/string/byte/strncpy"> <span class="t-lines"><span>strncpy</span><span>strncpy_s</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div> </td> <td> copies a certain amount of characters from one string to another <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strcat" title="c/string/byte/strcat"> <span class="t-lines"><span>strcat</span><span>strcat_s</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div> </td> <td> concatenates two strings <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strncat" title="c/string/byte/strncat"> <span class="t-lines"><span>strncat</span><span>strncat_s</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div> </td> <td> concatenates a certain amount of characters of two strings <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strxfrm" title="c/string/byte/strxfrm"> <span class="t-lines"><span>strxfrm</span></span></a></div> </td> <td> transform a string so that strcmp would produce the same result as strcoll <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strdup" title="c/string/byte/strdup"> <span class="t-lines"><span>strdup</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c23">(C23)</span></span></span></div> </td> <td> allocates a copy of a string <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strndup" title="c/string/byte/strndup"> <span class="t-lines"><span>strndup</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c23">(C23)</span></span></span></div> </td> <td> allocates a copy of a string of specified size <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr> <td colspan="2"> <h5 id="String_examination">  String examination </h5> </td>
</tr> <tr class="t-dsc-header"> <th colspan="2"> Defined in header <code>&lt;string.h&gt;</code>  </th>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strlen" title="c/string/byte/strlen"> <span class="t-lines"><span>strlen</span><span>strnlen_s</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div> </td> <td> returns the length of a given string <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strcmp" title="c/string/byte/strcmp"> <span class="t-lines"><span>strcmp</span></span></a></div> </td> <td> compares two strings <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strncmp" title="c/string/byte/strncmp"> <span class="t-lines"><span>strncmp</span></span></a></div> </td> <td> compares a certain amount of characters of two strings <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strcoll" title="c/string/byte/strcoll"> <span class="t-lines"><span>strcoll</span></span></a></div> </td> <td> compares two strings in accordance to the current locale <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strchr" title="c/string/byte/strchr"> <span class="t-lines"><span>strchr</span></span></a></div> </td> <td> finds the first occurrence of a character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strrchr" title="c/string/byte/strrchr"> <span class="t-lines"><span>strrchr</span></span></a></div> </td> <td> finds the last occurrence of a character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strspn" title="c/string/byte/strspn"> <span class="t-lines"><span>strspn</span></span></a></div> </td> <td> returns the length of the maximum initial segment that consists <br> of only the characters found in another byte string <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strcspn" title="c/string/byte/strcspn"> <span class="t-lines"><span>strcspn</span></span></a></div> </td> <td> returns the length of the maximum initial segment that consists <br> of only the characters not found in another byte string <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strpbrk" title="c/string/byte/strpbrk"> <span class="t-lines"><span>strpbrk</span></span></a></div> </td> <td> finds the first location of any character in one string, in another string <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strstr" title="c/string/byte/strstr"> <span class="t-lines"><span>strstr</span></span></a></div> </td> <td> finds the first occurrence of a substring of characters <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strtok" title="c/string/byte/strtok"> <span class="t-lines"><span>strtok</span><span>strtok_s</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div> </td> <td> finds the next token in a byte string <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr> <td colspan="2"> <h5 id="Character_array_manipulation">  Character array manipulation </h5> </td>
</tr> <tr class="t-dsc-header"> <th colspan="2"> Defined in header <code>&lt;string.h&gt;</code>  </th>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/memchr" title="c/string/byte/memchr"> <span class="t-lines"><span>memchr</span></span></a></div> </td> <td> searches an array for the first occurrence of a character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/memcmp" title="c/string/byte/memcmp"> <span class="t-lines"><span>memcmp</span></span></a></div> </td> <td> compares two buffers <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/memset" title="c/string/byte/memset"> <span class="t-lines"><span>memset</span><span>memset_explicit</span><span>memset_s</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c23">(C23)</span></span><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div> </td> <td> fills a buffer with a character <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/memcpy" title="c/string/byte/memcpy"> <span class="t-lines"><span>memcpy</span><span>memcpy_s</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div> </td> <td> copies one buffer to another <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/memmove" title="c/string/byte/memmove"> <span class="t-lines"><span>memmove</span><span>memmove_s</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div> </td> <td> moves one buffer to another <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/memccpy" title="c/string/byte/memccpy"> <span class="t-lines"><span>memccpy</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c23">(C23)</span></span></span></div> </td> <td> copies one buffer to another, stopping after the specified delimiter <br> <span class="t-mark">(function)</span>  </td>
</tr> <tr> <td colspan="2"> <h5 id="Miscellaneous">  Miscellaneous </h5> </td>
</tr> <tr class="t-dsc-header"> <th colspan="2"> Defined in header <code>&lt;string.h&gt;</code>  </th>
</tr> <tr class="t-dsc"> <td> <div><a href="byte/strerror" title="c/string/byte/strerror"> <span class="t-lines"><span>strerror</span><span>strerror_s</span><span>strerrorlen_s</span></span></a></div>
<div><span class="t-lines"><span><span class="t-mark-rev t-since-c11">(C11)</span></span><span><span class="t-mark-rev t-since-c11">(C11)</span></span></span></div> </td> <td> returns a text version of a given error code <br> <span class="t-mark">(function)</span>  </td>
</tr> </table> <h3 id="References"> References</h3>  <ul>
<li> C11 standard (ISO/IEC 9899:2011): </li>
<ul>
<li> 7.4 Character handling &lt;ctype.h&gt; (p: 200-204) </li>
<li> 7.8 Format conversion of integer types &lt;inttypes.h&gt; (p: 217-220) </li>
<li> 7.22 General utilities &lt;stdlib.h&gt; (p: 340-360) </li>
<li> 7.24 String handling &lt;string.h&gt; (p: 362-372) </li>
<li> 7.31.2 Character handling &lt;ctype.h&gt; (p: 455) </li>
<li> 7.31.5 Format conversion of integer types &lt;inttypes.h&gt; (p: 455) </li>
<li> 7.31.12 General utilities &lt;stdlib.h&gt; (p: 456) </li>
<li> 7.31.13 String handling &lt;string.h&gt; (p: 456) </li>
<li> K.3.6 General utilities &lt;stdlib.h&gt; (p: 604-613) </li>
<li> K.3.7 String handling &lt;string.h&gt; (p: 614-623) </li>
</ul>
<li> C99 standard (ISO/IEC 9899:1999): </li>
<ul>
<li> 7.4 Character handling &lt;ctype.h&gt; (p: 181-185) </li>
<li> 7.8 Format conversion of integer types &lt;inttypes.h&gt; (p: 198-201) </li>
<li> 7.20 General utilities &lt;stdlib.h&gt; (p: 306-324) </li>
<li> 7.21 String handling &lt;string.h&gt; (p: 325-334) </li>
<li> 7.26.2 Character handling &lt;ctype.h&gt; (p: 401) </li>
<li> 7.26.4 Format conversion of integer types &lt;inttypes.h&gt; (p: 401) </li>
<li> 7.26.10 General utilities &lt;stdlib.h&gt; (p: 402) </li>
<li> 7.26.11 String handling &lt;string.h&gt; (p: 402) </li>
</ul>
<li> C89/C90 standard (ISO/IEC 9899:1990): </li>
<ul>
<li> 4.3 CHARACTER HANDLING &lt;ctype.h&gt; </li>
<li> 4.10 GENERAL UTILITIES &lt;stdlib.h&gt; </li>
<li> 4.11 STRING HANDLING &lt;string.h&gt; </li>
<li> 4.13.2 Character handling &lt;ctype.h&gt; </li>
<li> 4.13.7 General utilities &lt;stdlib.h&gt; </li>
<li> 4.13.8 String handling &lt;string.h&gt; </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/string/byte" title="cpp/string/byte">C++ documentation</a></span> for <span class=""><span><code>Null</code>-terminated byte strings</span></span> </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/byte" class="_attribution-link">https://en.cppreference.com/w/c/string/byte</a>
  </p>
</div>