This file is indexed.

/usr/share/doc/racket/reference/bytestrings.html is in racket-doc 6.1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>4.4&nbsp;Byte Strings</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="icons.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9658;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="data.html" class="tocviewselflink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17&nbsp;</td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18&nbsp;</td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9660;</a></td><td>4&nbsp;</td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.1&nbsp;</td><td><a href="booleans.html" class="tocviewlink" data-pltdoc="x">Booleans and Equality</a></td></tr><tr><td align="right">4.2&nbsp;</td><td><a href="numbers.html" class="tocviewlink" data-pltdoc="x">Numbers</a></td></tr><tr><td align="right">4.3&nbsp;</td><td><a href="strings.html" class="tocviewlink" data-pltdoc="x">Strings</a></td></tr><tr><td align="right">4.4&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Byte Strings</a></td></tr><tr><td align="right">4.5&nbsp;</td><td><a href="characters.html" class="tocviewlink" data-pltdoc="x">Characters</a></td></tr><tr><td align="right">4.6&nbsp;</td><td><a href="symbols.html" class="tocviewlink" data-pltdoc="x">Symbols</a></td></tr><tr><td align="right">4.7&nbsp;</td><td><a href="regexp.html" class="tocviewlink" data-pltdoc="x">Regular Expressions</a></td></tr><tr><td align="right">4.8&nbsp;</td><td><a href="keywords.html" class="tocviewlink" data-pltdoc="x">Keywords</a></td></tr><tr><td align="right">4.9&nbsp;</td><td><a href="pairs.html" class="tocviewlink" data-pltdoc="x">Pairs and Lists</a></td></tr><tr><td align="right">4.10&nbsp;</td><td><a href="mpairs.html" class="tocviewlink" data-pltdoc="x">Mutable Pairs and Lists</a></td></tr><tr><td align="right">4.11&nbsp;</td><td><a href="vectors.html" class="tocviewlink" data-pltdoc="x">Vectors</a></td></tr><tr><td align="right">4.12&nbsp;</td><td><a href="boxes.html" class="tocviewlink" data-pltdoc="x">Boxes</a></td></tr><tr><td align="right">4.13&nbsp;</td><td><a href="hashtables.html" class="tocviewlink" data-pltdoc="x">Hash Tables</a></td></tr><tr><td align="right">4.14&nbsp;</td><td><a href="sequences_streams.html" class="tocviewlink" data-pltdoc="x">Sequences and Streams</a></td></tr><tr><td align="right">4.15&nbsp;</td><td><a href="dicts.html" class="tocviewlink" data-pltdoc="x">Dictionaries</a></td></tr><tr><td align="right">4.16&nbsp;</td><td><a href="sets.html" class="tocviewlink" data-pltdoc="x">Sets</a></td></tr><tr><td align="right">4.17&nbsp;</td><td><a href="procedures.html" class="tocviewlink" data-pltdoc="x">Procedures</a></td></tr><tr><td align="right">4.18&nbsp;</td><td><a href="void.html" class="tocviewlink" data-pltdoc="x">Void</a></td></tr><tr><td align="right">4.19&nbsp;</td><td><a href="undefined.html" class="tocviewlink" data-pltdoc="x">Undefined</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_2&quot;);">&#9658;</a></td><td>4.4&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Byte Strings</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">4.4.1&nbsp;</td><td><a href="#%28part._.Byte_.String_.Constructors__.Selectors__and_.Mutators%29" class="tocviewlink" data-pltdoc="x">Byte String Constructors, Selectors, and Mutators</a></td></tr><tr><td align="right">4.4.2&nbsp;</td><td><a href="#%28part._.Byte_.String_.Comparisons%29" class="tocviewlink" data-pltdoc="x">Byte String Comparisons</a></td></tr><tr><td align="right">4.4.3&nbsp;</td><td><a href="#%28part._.Bytes_to_from_.Characters__.Decoding_and_.Encoding%29" class="tocviewlink" data-pltdoc="x">Bytes to/<span class="mywbr"> &nbsp;</span>from Characters, Decoding and Encoding</a></td></tr><tr><td align="right">4.4.4&nbsp;</td><td><a href="#%28part._.Bytes_to_.Bytes_.Encoding_.Conversion%29" class="tocviewlink" data-pltdoc="x">Bytes to Bytes Encoding Conversion</a></td></tr><tr><td align="right">4.4.5&nbsp;</td><td><a href="#%28part._.Additional_.Byte_.String_.Functions%29" class="tocviewlink" data-pltdoc="x">Additional Byte String Functions</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">4.4.1<tt>&nbsp;</tt></span><a href="#%28part._.Byte_.String_.Constructors__.Selectors__and_.Mutators%29" class="tocsubseclink" data-pltdoc="x">Byte String Constructors, Selectors, and Mutators</a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-bytes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>bytes</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3eimmutable-bytes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>&gt;immutable-<wbr></wbr>bytes</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">byte?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>length</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-ref%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>ref</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-set%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>set!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._subbytes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">subbytes</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-copy%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>copy</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-copy%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>copy!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-fill%21%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>fill!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-append%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>append</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3elist%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>&gt;list</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._list-~3ebytes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">list-<wbr></wbr>&gt;bytes</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._make-shared-bytes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>shared-<wbr></wbr>bytes</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._shared-bytes%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">shared-<wbr></wbr>bytes</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.4.2<tt>&nbsp;</tt></span><a href="#%28part._.Byte_.String_.Comparisons%29" class="tocsubseclink" data-pltdoc="x">Byte String Comparisons</a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3d~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes=?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3c~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes&lt;?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3e~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes&gt;?</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.4.3<tt>&nbsp;</tt></span><a href="#%28part._.Bytes_to_from_.Characters__.Decoding_and_.Encoding%29" class="tocsubseclink" data-pltdoc="x">Bytes to/<span class="mywbr"> &nbsp;</span>from Characters, Decoding and Encoding</a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Futf-8%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>&gt;string/<span class="mywbr"> &nbsp;</span>utf-<wbr></wbr>8</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Flocale%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>&gt;string/<span class="mywbr"> &nbsp;</span>locale</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Flatin-1%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>&gt;string/<span class="mywbr"> &nbsp;</span>latin-<wbr></wbr>1</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._string-~3ebytes%2Futf-8%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">string-<wbr></wbr>&gt;bytes/<span class="mywbr"> &nbsp;</span>utf-<wbr></wbr>8</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._string-~3ebytes%2Flocale%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">string-<wbr></wbr>&gt;bytes/<span class="mywbr"> &nbsp;</span>locale</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._string-~3ebytes%2Flatin-1%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">string-<wbr></wbr>&gt;bytes/<span class="mywbr"> &nbsp;</span>latin-<wbr></wbr>1</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._string-utf-8-length%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">string-<wbr></wbr>utf-<wbr></wbr>8-<wbr></wbr>length</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-length%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>utf-<wbr></wbr>8-<wbr></wbr>length</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-ref%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>utf-<wbr></wbr>8-<wbr></wbr>ref</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-index%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>utf-<wbr></wbr>8-<wbr></wbr>index</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.4.4<tt>&nbsp;</tt></span><a href="#%28part._.Bytes_to_.Bytes_.Encoding_.Conversion%29" class="tocsubseclink" data-pltdoc="x">Bytes to Bytes Encoding Conversion</a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>open-<wbr></wbr>converter</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-close-converter%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>close-<wbr></wbr>converter</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>convert</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert-end%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>convert-<wbr></wbr>end</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-converter~3f%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>converter?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28quote._~23~25kernel%29._locale-string-encoding%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">locale-<wbr></wbr>string-<wbr></wbr>encoding</span></span></a></td></tr><tr><td><span class="tocsublinknumber">4.4.5<tt>&nbsp;</tt></span><a href="#%28part._.Additional_.Byte_.String_.Functions%29" class="tocsubseclink" data-pltdoc="x">Additional Byte String Functions</a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fbytes..rkt%29._bytes-append%2A%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>append*</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fbytes..rkt%29._bytes-join%29%29" class="tocsubnonseclink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">bytes-<wbr></wbr>join</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="strings.html" title="backward to &quot;4.3 Strings&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="data.html" title="up to &quot;4 Datatypes&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="characters.html" title="forward to &quot;4.5 Characters&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h4 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-part-tag="&quot;bytestrings&quot;">4.4<tt>&nbsp;</tt><a name="(part._bytestrings)"></a>Byte Strings</h4><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="finger.png" alt="+" width="24" height="24"/></span><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=bytestrings.html&amp;version=6.1" class="Sq" data-pltdoc="x">Bytes and Byte Strings</a> in <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=index.html&amp;version=6.1" class="Sq" data-pltdoc="x"><span style="font-weight: bold">The Racket Guide</span></a> introduces byte strings.</p></blockquote></blockquote></blockquote><p>A <a name="(tech._byte._string)"></a><span style="font-style: italic">byte string</span> is a fixed-length array of bytes. A
 <a name="(idx._(gentag._117._(lib._scribblings/reference/reference..scrbl)))"></a><span style="font-style: italic">byte</span> is an exact integer between <span class="RktVal">0</span> and
 <span class="RktVal">255</span> inclusive.</p><p><a name="(idx._(gentag._118._(lib._scribblings/reference/reference..scrbl)))"></a>A byte string can be
<span style="font-style: italic">mutable</span> or <span style="font-style: italic">immutable</span>. When an immutable byte
string is provided to a procedure like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-set%21%29%29" class="RktValLink" data-pltdoc="x">bytes-set!</a></span>, the
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised. Byte-string constants generated by the
default reader (see <a href="reader.html#%28part._parse-string%29" data-pltdoc="x">Reading Strings</a>) are immutable,
and they are <a href="reader.html#%28tech._interned%29" class="techoutside" data-pltdoc="x"><span class="techinside">interned</span></a> in <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read-syntax%29%29" class="RktValLink" data-pltdoc="x">read-syntax</a></span> mode.</p><p>Two byte strings are <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span> when they have the same length
and contain the same sequence of bytes.</p><p>A byte string can be used as a single-valued sequence (see
<a href="sequences.html" data-pltdoc="x">Sequences</a>). The bytes of the string serve as elements
of the sequence. See also <span class="RktSym"><a href="sequences.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._in-bytes%29%29" class="RktValLink" data-pltdoc="x">in-bytes</a></span>.</p><p>See <a href="reader.html#%28part._parse-string%29" data-pltdoc="x">Reading Strings</a>
    for information on <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span>ing
    byte strings and <a href="printing.html#%28part._print-string%29" data-pltdoc="x">Printing Strings</a>
    for information on <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print%29%29" class="RktValLink" data-pltdoc="x">print</a></span>ing byte strings.</p><p>See also: <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span>.</p><h5 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-part-tag="&quot;Byte_String_Constructors__Selectors__and_Mutators&quot;">4.4.1<tt>&nbsp;</tt><a name="(part._.Byte_.String_.Constructors__.Selectors__and_.Mutators)"></a>Byte String Constructors, Selectors, and Mutators</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span>
 is a byte string, <span class="RktVal">#f</span> otherwise.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"Apple"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._make-bytes))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-bytes%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-bytes</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">k</span><span class="hspace">&nbsp;</span>[<span class="RktVar">b</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">k</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">b</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns a new mutable byte string of length <span class="RktVar">k</span> where each
position in the byte string is initialized with the byte <span class="RktVar">b</span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-bytes%29%29" class="RktValLink" data-pltdoc="x">make-bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"AAAAA"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">b</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">b</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns a new mutable byte
string whose length is the number of provided <span class="RktVar">b</span>s, and whose
positions are initialized with the given <span class="RktVar">b</span>s.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">108</span><span class="hspace">&nbsp;</span><span class="RktVal">101</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"Apple"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-~3eimmutable-bytes))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3eimmutable-bytes%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-&gt;immutable-bytes</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns an immutable byte string with the same content
 as <span class="RktVar">bstr</span>, returning <span class="RktVar">bstr</span> itself if <span class="RktVar">bstr</span> is
 immutable.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3eimmutable-bytes%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;immutable-bytes</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"AAA"</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3eimmutable-bytes%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;immutable-bytes</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-bytes%29%29" class="RktValLink" data-pltdoc="x">make-bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3eimmutable-bytes%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;immutable-bytes</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"AAAAA"</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eq~3f%29%29" class="RktValLink" data-pltdoc="x">eq?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3eimmutable-bytes%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;immutable-bytes</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._byte~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">byte?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is
 a byte (i.e., an exact integer between <span class="RktVal">0</span> and <span class="RktVal">255</span>
 inclusive), <span class="RktVal">#f</span> otherwise.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">256</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span><span class="hspace">&nbsp;</span><span class="RktVal"><span class="nobreak">-1</span></span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-length))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-length</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the length of <span class="RktVar">bstr</span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">5</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-ref))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-ref%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-ref</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span><span class="RktVar">k</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">k</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">  Returns the character at position <span class="RktVar">k</span> in <span class="RktVar">bstr</span>.
 The first position in the bytes cooresponds to <span class="RktVal">0</span>, so the
 position <span class="RktVar">k</span> must be less than the length of the bytes,
 otherwise the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-ref%29%29" class="RktValLink" data-pltdoc="x">bytes-ref</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">65</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-set!))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-set%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-set!</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span><span class="RktVar">k</span><span class="hspace">&nbsp;</span><span class="RktVar">b</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._not%2Fc%29%29" class="RktValLink" data-pltdoc="x">not/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">k</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">b</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">  Changes the
 character position <span class="RktVar">k</span> in <span class="RktVar">bstr</span> to <span class="RktVar">b</span>.  The first
 position in the byte string cooresponds to <span class="RktVal">0</span>, so the position
 <span class="RktVar">k</span> must be less than the length of the bytes, otherwise the
 <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">s</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">108</span><span class="hspace">&nbsp;</span><span class="RktVal">101</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-set%21%29%29" class="RktValLink" data-pltdoc="x">bytes-set!</a></span><span class="hspace">&nbsp;</span><span class="RktSym">s</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="hspace">&nbsp;</span><span class="RktVal">121</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktSym">s</span></td></tr><tr><td><p><span class="RktRes">#"Apply"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._subbytes))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._subbytes%29%29" class="RktValDef RktValLink" data-pltdoc="x">subbytes</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>[<span class="RktVar">end</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktSym">str</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns
 a new mutable byte string that is <span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._-%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-</span></a></span><span class="stt"> </span><span class="RktVar">end</span><span class="stt"> </span><span class="RktVar">start</span><span class="RktPn">)</span> bytes long,
 and that contains the same bytes as <span class="RktVar">bstr</span> from <span class="RktVar">start</span>
 inclusive to <span class="RktVar">end</span> exclusive.  The <span class="RktVar">start</span> and
 <span class="RktVar">end</span> arguments must be less than or equal to the length of
 <span class="RktVar">bstr</span>, and <span class="RktVar">end</span> must be greater than or equal to
 <span class="RktVar">start</span>, otherwise the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._subbytes%29%29" class="RktValLink" data-pltdoc="x">subbytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"pp"</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._subbytes%29%29" class="RktValLink" data-pltdoc="x">subbytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"pple"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-copy))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-copy%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-copy</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns
<span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._subbytes%29%29" class="RktValLink" data-pltdoc="x">subbytes</a></span><span class="stt"> </span><span class="RktSym">str</span><span class="stt"> </span><span class="RktVal">0</span><span class="RktPn">)</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-copy!))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-copy%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-copy!</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">dest</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">dest-start</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">src</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span>[</td><td><span class="RktVar">src-start</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">src-end</span>]<span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">dest</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._not%2Fc%29%29" class="RktValLink" data-pltdoc="x">not/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">dest-start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">src</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">src-start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">src-end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">src</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Changes the bytes of <span class="RktVar">dest</span> starting at position
 <span class="RktVar">dest-start</span> to match the bytes in <span class="RktVar">src</span> from
 <span class="RktVar">src-start</span> (inclusive) to <span class="RktVar">src-end</span> (exclusive). The
 bytes strings <span class="RktVar">dest</span> and <span class="RktVar">src</span> can be the same byte
 string, and in that case the destination region can overlap with the
 source region; the destination bytes after the copy match the source
 bytes from before the copy. If any of <span class="RktVar">dest-start</span>,
 <span class="RktVar">src-start</span>, or <span class="RktVar">src-end</span> are out of range (taking into
 account the sizes of the bytes strings and the source and destination
 regions), the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">s</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">108</span><span class="hspace">&nbsp;</span><span class="RktVal">101</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-copy%21%29%29" class="RktValLink" data-pltdoc="x">bytes-copy!</a></span><span class="hspace">&nbsp;</span><span class="RktSym">s</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="hspace">&nbsp;</span><span class="RktVal">#"y"</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-copy%21%29%29" class="RktValLink" data-pltdoc="x">bytes-copy!</a></span><span class="hspace">&nbsp;</span><span class="RktSym">s</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="hspace">&nbsp;</span><span class="RktSym">s</span><span class="hspace">&nbsp;</span><span class="RktVal">3</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktSym">s</span></td></tr><tr><td><p><span class="RktRes">#"lpply"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-fill!))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-fill%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-fill!</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">dest</span><span class="hspace">&nbsp;</span><span class="RktVar">b</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">dest</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._not%2Fc%29%29" class="RktValLink" data-pltdoc="x">not/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">b</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Changes <span class="RktVar">dest</span> so that every position in the
 bytes is filled with <span class="RktVar">b</span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">s</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">108</span><span class="hspace">&nbsp;</span><span class="RktVal">101</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-fill%21%29%29" class="RktValLink" data-pltdoc="x">bytes-fill!</a></span><span class="hspace">&nbsp;</span><span class="RktSym">s</span><span class="hspace">&nbsp;</span><span class="RktVal">113</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktSym">s</span></td></tr><tr><td><p><span class="RktRes">#"qqqqq"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-append))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-append%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-append</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"><a name="(idx._(gentag._119._(lib._scribblings/reference/reference..scrbl)))"></a>Returns a new mutable byte string
that is as long as the sum of the given <span class="RktVar">bstr</span>s&rsquo; lengths, and
that contains the concatenated bytes of the given <span class="RktVar">bstr</span>s. If
no <span class="RktVar">bstr</span>s are provided, the result is a zero-length byte
string.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-append%29%29" class="RktValLink" data-pltdoc="x">bytes-append</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"Banana"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"AppleBanana"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-~3elist))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3elist%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-&gt;list</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns a new
 list of bytes corresponding to the content of <span class="RktVar">bstr</span>. That is,
 the length of the list is <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="stt"> </span><span class="RktVar">bstr</span><span class="RktPn">)</span>, and the
 sequence of bytes in <span class="RktVar">bstr</span> is the same sequence in the
 result list.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3elist%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">'(65 112 112 108 101)</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._list-~3ebytes))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._list-~3ebytes%29%29" class="RktValDef RktValLink" data-pltdoc="x">list-&gt;bytes</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">lst</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">lst</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns a new
 mutable byte string whose content is the list of bytes in <span class="RktVar">lst</span>.
 That is, the length of the byte string is <span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._length%29%29" class="RktValLink" data-pltdoc="x">length</a></span><span class="stt"> </span><span class="RktVar">lst</span><span class="RktPn">)</span>, and
 the sequence of bytes in <span class="RktVar">lst</span> is the same sequence in
 the result byte string.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._list-~3ebytes%29%29" class="RktValLink" data-pltdoc="x">list-&gt;bytes</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">108</span><span class="hspace">&nbsp;</span><span class="RktVal">101</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"Apple"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._make-shared-bytes))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-shared-bytes%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-shared-bytes</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">k</span><span class="hspace">&nbsp;</span>[<span class="RktVar">b</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">k</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">b</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns a new mutable byte string of length <span class="RktVar">k</span> where each
position in the byte string is initialized with the byte <span class="RktVar">b</span>.
For communication among <a href="places.html#%28tech._place%29" class="techoutside" data-pltdoc="x"><span class="techinside">places</span></a>, the new byte string is allocated in the
<a href="places.html#%28tech._shared._memory._space%29" class="techoutside" data-pltdoc="x"><span class="techinside">shared memory space</span></a>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-shared-bytes%29%29" class="RktValLink" data-pltdoc="x">make-shared-bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"AAAAA"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._shared-bytes))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._shared-bytes%29%29" class="RktValDef RktValLink" data-pltdoc="x">shared-bytes</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">b</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">b</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns a new mutable byte
string whose length is the number of provided <span class="RktVar">b</span>s, and whose
positions are initialized with the given <span class="RktVar">b</span>s.
For communication among <a href="places.html#%28tech._place%29" class="techoutside" data-pltdoc="x"><span class="techinside">places</span></a>, the new byte string is allocated in the
<a href="places.html#%28tech._shared._memory._space%29" class="techoutside" data-pltdoc="x"><span class="techinside">shared memory space</span></a>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._shared-bytes%29%29" class="RktValLink" data-pltdoc="x">shared-bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">112</span><span class="hspace">&nbsp;</span><span class="RktVal">108</span><span class="hspace">&nbsp;</span><span class="RktVal">101</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"Apple"</span></p></td></tr></table></blockquote></td></tr></table></p><h5 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-part-tag="&quot;Byte_String_Comparisons&quot;">4.4.2<tt>&nbsp;</tt><a name="(part._.Byte_.String_.Comparisons)"></a>Byte String Comparisons</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes~3d~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3d~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes=?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr1</span><span class="hspace">&nbsp;</span><span class="RktVar">bstr2</span><span class="hspace">&nbsp;</span><span class="RktMeta">...+</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></div><div class="SIntrapara"> Returns
<span class="RktVal">#t</span> if all of the arguments are <span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._eqv~3f%29%29" class="RktValLink" data-pltdoc="x">eqv?</a></span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3d~3f%29%29" class="RktValLink" data-pltdoc="x">bytes=?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"apple"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3d~3f%29%29" class="RktValLink" data-pltdoc="x">bytes=?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"a"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"as"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"a"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes~3c~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3c~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes&lt;?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr1</span><span class="hspace">&nbsp;</span><span class="RktVar">bstr2</span><span class="hspace">&nbsp;</span><span class="RktMeta">...+</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if the arguments are lexicographically sorted
 increasing, where individual bytes are ordered by <span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._~3c%29%29" class="RktValLink" data-pltdoc="x">&lt;</a></span>,
 <span class="RktVal">#f</span> otherwise.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3c~3f%29%29" class="RktValLink" data-pltdoc="x">bytes&lt;?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"apple"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3c~3f%29%29" class="RktValLink" data-pltdoc="x">bytes&lt;?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"apple"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3c~3f%29%29" class="RktValLink" data-pltdoc="x">bytes&lt;?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"a"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"b"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"c"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes~3e~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3e~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes&gt;?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr1</span><span class="hspace">&nbsp;</span><span class="RktVar">bstr2</span><span class="hspace">&nbsp;</span><span class="RktMeta">...+</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3c~3f%29%29" class="RktValLink" data-pltdoc="x">bytes&lt;?</a></span>, but checks whether the arguments are decreasing.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3e~3f%29%29" class="RktValLink" data-pltdoc="x">bytes&gt;?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"apple"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3e~3f%29%29" class="RktValLink" data-pltdoc="x">bytes&gt;?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"apple"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"Apple"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3e~3f%29%29" class="RktValLink" data-pltdoc="x">bytes&gt;?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"c"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"b"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"a"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr></table></blockquote></td></tr></table></p><h5 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-part-tag="&quot;Bytes_to_from_Characters__Decoding_and_Encoding&quot;">4.4.3<tt>&nbsp;</tt><a name="(part._.Bytes_to_from_.Characters__.Decoding_and_.Encoding)"></a>Bytes to/from Characters, Decoding and Encoding</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-~3estring/utf-8))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Futf-8%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-&gt;string/utf-8</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>[<span class="RktVar">err-char</span><span class="hspace">&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span><span class="RktVar">end</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">err-char</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._char~3f%29%29" class="RktValLink" data-pltdoc="x">char?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a string by decoding the <span class="RktVar">start</span> to <span class="RktVar">end</span>
 substring of <span class="RktVar">bstr</span> as a UTF-8 encoding of Unicode code
 points.  If <span class="RktVar">err-char</span> is not <span class="RktVal">#f</span>, then it is used for
 bytes that fall in the range <span class="RktVal">128</span> to <span class="RktVal">255</span> but are
 not part of a valid encoding sequence. (This rule is consistent with
 reading characters from a port; see <a href="encodings.html" data-pltdoc="x">Encodings and Locales</a> for more
 details.)  If <span class="RktVar">err-char</span> is <span class="RktVal">#f</span>, and if the
 <span class="RktVar">start</span> to <span class="RktVar">end</span> substring of <span class="RktVar">bstr</span> is not a
 valid UTF-8 encoding overall, then the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Futf-8%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;string/utf-8</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"&#231;&#240;&#246;&#163;"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-~3estring/locale))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Flocale%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-&gt;string/locale</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">bstr</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span>[</td><td><span class="RktVar">err-char</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">start</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">end</span>]<span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">err-char</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._char~3f%29%29" class="RktValLink" data-pltdoc="x">char?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a string by decoding the <span class="RktVar">start</span> to <span class="RktVar">end</span> substring
of <span class="RktVar">bstr</span> using the current locale&rsquo;s encoding (see also
<a href="encodings.html" data-pltdoc="x">Encodings and Locales</a>). If <span class="RktVar">err-char</span> is not
<span class="RktVal">#f</span>, it is used for each byte in <span class="RktVar">bstr</span> that is not part
of a valid encoding; if <span class="RktVar">err-char</span> is <span class="RktVal">#f</span>, and if the
<span class="RktVar">start</span> to <span class="RktVar">end</span> substring of <span class="RktVar">bstr</span> is not a valid
encoding overall, then the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-~3estring/latin-1))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Flatin-1%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-&gt;string/latin-1</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">bstr</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span>[</td><td><span class="RktVar">err-char</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">start</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">end</span>]<span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">err-char</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._char~3f%29%29" class="RktValLink" data-pltdoc="x">char?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a string by decoding the <span class="RktVar">start</span> to <span class="RktVar">end</span> substring
 of <span class="RktVar">bstr</span> as a Latin-1 encoding of Unicode code points; i.e.,
 each byte is translated directly to a character using
 <span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._integer-~3echar%29%29" class="RktValLink" data-pltdoc="x">integer-&gt;char</a></span>, so the decoding always succeeds.
 The <span class="RktVar">err-char</span>
 argument is ignored, but present for consistency with the other
 operations.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Flatin-1%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;string/latin-1</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">254</span><span class="hspace">&nbsp;</span><span class="RktVal">211</span><span class="hspace">&nbsp;</span><span class="RktVal">209</span><span class="hspace">&nbsp;</span><span class="RktVal">165</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"&#254;&#211;&#209;&#165;"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._string-~3ebytes/utf-8))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._string-~3ebytes%2Futf-8%29%29" class="RktValDef RktValLink" data-pltdoc="x">string-&gt;bytes/utf-8</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">str</span><span class="hspace">&nbsp;</span>[<span class="RktVar">err-byte</span><span class="hspace">&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span><span class="RktVar">end</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">str</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">err-byte</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string-length%29%29" class="RktValLink" data-pltdoc="x">string-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">str</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a byte string by encoding the <span class="RktVar">start</span> to <span class="RktVar">end</span>
 substring of <span class="RktVar">str</span> via UTF-8 (always succeeding). The
 <span class="RktVar">err-byte</span> argument is ignored, but included for consistency with
 the other operations.
</div><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Futf-8%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;string/utf-8</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._string-~3ebytes%2Futf-8%29%29" class="RktValLink" data-pltdoc="x">string-&gt;bytes/utf-8</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"\303\247\303\260\303\266\302\243"</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Futf-8%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;string/utf-8</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._string-~3ebytes%2Futf-8%29%29" class="RktValLink" data-pltdoc="x">string-&gt;bytes/utf-8</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"&#231;&#240;&#246;&#163;"</span></p></td></tr></table></blockquote></td></tr></table></div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._string-~3ebytes/locale))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._string-~3ebytes%2Flocale%29%29" class="RktValDef RktValLink" data-pltdoc="x">string-&gt;bytes/locale</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">str</span><span class="hspace">&nbsp;</span>[<span class="RktVar">err-byte</span><span class="hspace">&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span><span class="RktVar">end</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">str</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">err-byte</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string-length%29%29" class="RktValLink" data-pltdoc="x">string-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">str</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a string by encoding the <span class="RktVar">start</span> to <span class="RktVar">end</span> substring
of <span class="RktVar">str</span> using the current locale&rsquo;s encoding (see also
<a href="encodings.html" data-pltdoc="x">Encodings and Locales</a>). If <span class="RktVar">err-byte</span> is not <span class="RktVal">#f</span>, it is used
for each character in <span class="RktVar">str</span> that cannot be encoded for the
current locale; if <span class="RktVar">err-byte</span> is <span class="RktVal">#f</span>, and if the
<span class="RktVar">start</span> to <span class="RktVar">end</span> substring of <span class="RktVar">str</span> cannot be encoded,
then the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._string-~3ebytes/latin-1))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._string-~3ebytes%2Flatin-1%29%29" class="RktValDef RktValLink" data-pltdoc="x">string-&gt;bytes/latin-1</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">str</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span>[</td><td><span class="RktVar">err-byte</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">start</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">end</span>]<span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">str</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">err-byte</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string-length%29%29" class="RktValLink" data-pltdoc="x">string-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">str</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a string by encoding the <span class="RktVar">start</span> to <span class="RktVar">end</span> substring
 of <span class="RktVar">str</span> using Latin-1; i.e., each character is translated
 directly to a byte using <span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._char-~3einteger%29%29" class="RktValLink" data-pltdoc="x">char-&gt;integer</a></span>. If <span class="RktVar">err-byte</span> is
 not <span class="RktVal">#f</span>, it is used for each character in <span class="RktVar">str</span> whose
 value is greater than <span class="RktVal">255</span>.
 If <span class="RktVar">err-byte</span> is <span class="RktVal">#f</span>, and if the
 <span class="RktVar">start</span> to <span class="RktVar">end</span> substring of <span class="RktVar">str</span> has a character
 with a value greater than <span class="RktVal">255</span>, then the
 <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Flatin-1%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;string/latin-1</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">254</span><span class="hspace">&nbsp;</span><span class="RktVal">211</span><span class="hspace">&nbsp;</span><span class="RktVal">209</span><span class="hspace">&nbsp;</span><span class="RktVal">165</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._string-~3ebytes%2Flatin-1%29%29" class="RktValLink" data-pltdoc="x">string-&gt;bytes/latin-1</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"\376\323\321\245"</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Flatin-1%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;string/latin-1</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._string-~3ebytes%2Flatin-1%29%29" class="RktValLink" data-pltdoc="x">string-&gt;bytes/latin-1</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">"&#254;&#211;&#209;&#165;"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._string-utf-8-length))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._string-utf-8-length%29%29" class="RktValDef RktValLink" data-pltdoc="x">string-utf-8-length</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">str</span><span class="hspace">&nbsp;</span>[<span class="RktVar">start</span><span class="hspace">&nbsp;</span><span class="RktVar">end</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">str</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string-length%29%29" class="RktValLink" data-pltdoc="x">string-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">str</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the length in bytes of the UTF-8 encoding of <span class="RktVar">str</span>&rsquo;s
 substring from <span class="RktVar">start</span> to <span class="RktVar">end</span>, but without actually
 generating the encoded bytes.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._string-utf-8-length%29%29" class="RktValLink" data-pltdoc="x">string-utf-8-length</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Futf-8%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;string/utf-8</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">8</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._string-utf-8-length%29%29" class="RktValLink" data-pltdoc="x">string-utf-8-length</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"hello"</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">5</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-utf-8-length))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-length%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-utf-8-length</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>[<span class="RktVar">err-char</span><span class="hspace">&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span><span class="RktVar">end</span>]<span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">err-char</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._char~3f%29%29" class="RktValLink" data-pltdoc="x">char?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the length in characters of the UTF-8 decoding of
 <span class="RktVar">bstr</span>&rsquo;s substring from <span class="RktVar">start</span> to <span class="RktVar">end</span>, but without
 actually generating the decoded characters. If <span class="RktVar">err-char</span> is
 <span class="RktVal">#f</span> and the substring is not a UTF-8 encoding overall, the
 result is <span class="RktVal">#f</span>. Otherwise, <span class="RktVar">err-char</span> is used to resolve
 decoding errors as in <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Futf-8%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;string/utf-8</a></span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-length%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-length</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">4</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-length%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-length</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._make-bytes%29%29" class="RktValLink" data-pltdoc="x">make-bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">5</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-utf-8-ref))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-ref%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-utf-8-ref</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>[<span class="RktVar">skip</span><span class="hspace">&nbsp;</span><span class="RktVar">err-char</span><span class="hspace">&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span><span class="RktVar">end</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._char~3f%29%29" class="RktValLink" data-pltdoc="x">char?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">skip</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">err-char</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._char~3f%29%29" class="RktValLink" data-pltdoc="x">char?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the <span class="RktVar">skip</span>th character in the UTF-8 decoding of
 <span class="RktVar">bstr</span>&rsquo;s substring from <span class="RktVar">start</span> to <span class="RktVar">end</span>, but without
 actually generating the other decoded characters. If the substring is
 not a UTF-8 encoding up to the <span class="RktVar">skip</span>th character (when
 <span class="RktVar">err-char</span> is <span class="RktVal">#f</span>), or if the substring decoding produces
 fewer than <span class="RktVar">skip</span> characters, the result is <span class="RktVal">#f</span>. If
 <span class="RktVar">err-char</span> is not <span class="RktVal">#f</span>, it is used to resolve decoding
 errors as in <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Futf-8%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;string/utf-8</a></span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-ref%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-ref</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#\&#231;</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-ref%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-ref</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#\&#240;</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-ref%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-ref</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#\&#246;</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-ref%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-ref</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">66</span><span class="hspace">&nbsp;</span><span class="RktVal">67</span><span class="hspace">&nbsp;</span><span class="RktVal">68</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#\A</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-ref%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-ref</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">66</span><span class="hspace">&nbsp;</span><span class="RktVal">67</span><span class="hspace">&nbsp;</span><span class="RktVal">68</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#\B</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-ref%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-ref</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">66</span><span class="hspace">&nbsp;</span><span class="RktVal">67</span><span class="hspace">&nbsp;</span><span class="RktVal">68</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#\C</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-utf-8-index))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-index%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-utf-8-index</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">bstr</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span>[</td><td><span class="RktVar">skip</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">err-char</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">start</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">end</span>]<span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">skip</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">err-char</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._char~3f%29%29" class="RktValLink" data-pltdoc="x">char?</a></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns the offset in bytes into <span class="RktVar">bstr</span> at which the <span class="RktVar">skip</span>th
 character&rsquo;s encoding starts in the UTF-8 decoding of <span class="RktVar">bstr</span>&rsquo;s
 substring from <span class="RktVar">start</span> to <span class="RktVar">end</span> (but without actually
 generating the other decoded characters). The result is relative to
 the start of <span class="RktVar">bstr</span>, not to <span class="RktVar">start</span>. If the substring is not
 a UTF-8 encoding up to the <span class="RktVar">skip</span>th character (when
 <span class="RktVar">err-char</span> is <span class="RktVal">#f</span>), or if the substring decoding produces
 fewer than <span class="RktVar">skip</span> characters, the result is <span class="RktVal">#f</span>. If
 <span class="RktVar">err-char</span> is not <span class="RktVal">#f</span>, it is used to resolve decoding
 errors as in <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-~3estring%2Futf-8%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;string/utf-8</a></span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-index%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-index</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">0</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-index%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-index</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-index%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-index</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">4</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-index%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-index</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">66</span><span class="hspace">&nbsp;</span><span class="RktVal">67</span><span class="hspace">&nbsp;</span><span class="RktVal">68</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">0</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-index%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-index</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">66</span><span class="hspace">&nbsp;</span><span class="RktVal">67</span><span class="hspace">&nbsp;</span><span class="RktVal">68</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">1</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-utf-8-index%29%29" class="RktValLink" data-pltdoc="x">bytes-utf-8-index</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">66</span><span class="hspace">&nbsp;</span><span class="RktVal">67</span><span class="hspace">&nbsp;</span><span class="RktVal">68</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">2</span></p></td></tr></table></blockquote></td></tr></table></p><h5 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-part-tag="&quot;Bytes_to_Bytes_Encoding_Conversion&quot;">4.4.4<tt>&nbsp;</tt><a name="(part._.Bytes_to_.Bytes_.Encoding_.Conversion)"></a>Bytes to Bytes Encoding Conversion</h5><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-open-converter))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-open-converter</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">from-name</span><span class="hspace">&nbsp;</span><span class="RktVar">to-name</span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-converter~3f%29%29" class="RktValLink" data-pltdoc="x">bytes-converter?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">from-name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">to-name</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a <a name="(tech._byte._converter)"></a><span style="font-style: italic">byte converter</span> to go from the encoding named by
<span class="RktVar">from-name</span> to the encoding named by <span class="RktVar">to-name</span>. If the
requested conversion pair is not available, <span class="RktVal">#f</span> is returned
instead of a converter.</div></p><p>Certain encoding combinations are always available:</p><ul><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="stt"> </span><span class="RktVal">"UTF-8"</span><span class="stt"> </span><span class="RktVal">"UTF-8"</span><span class="RktPn">)</span> &#8212;<wbr></wbr> the
identity conversion, except that encoding errors in the input lead
to a decoding failure.</p></li><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="stt"> </span><span class="RktVal">"UTF-8-permissive"</span><span class="stt"> </span><span class="RktVal">"UTF-8"</span><span class="RktPn">)</span> &#8212;<wbr></wbr>
<a name="(idx._(gentag._120._(lib._scribblings/reference/reference..scrbl)))"></a>the identity conversion, except that
any input byte that is not part of a valid encoding sequence is
effectively replaced by the UTF-8 encoding sequence for
<span class="RktVal">#\uFFFD</span>.  (This handling of invalid sequences is
consistent with the interpretation of port bytes streams into
characters; see <a href="ports.html" data-pltdoc="x">Ports</a>.)</p></li><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="stt"> </span><span class="RktVal">""</span><span class="stt"> </span><span class="RktVal">"UTF-8"</span><span class="RktPn">)</span> &#8212;<wbr></wbr> converts from
the current locale&rsquo;s default encoding (see <a href="encodings.html" data-pltdoc="x">Encodings and Locales</a>)
to UTF-8.</p></li><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="stt"> </span><span class="RktVal">"UTF-8"</span><span class="stt"> </span><span class="RktVal">""</span><span class="RktPn">)</span> &#8212;<wbr></wbr> converts from
UTF-8 to the current locale&rsquo;s default encoding (see
<a href="encodings.html" data-pltdoc="x">Encodings and Locales</a>).</p></li><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="stt"> </span><span class="RktVal">"platform-UTF-8"</span><span class="stt"> </span><span class="RktVal">"platform-UTF-16"</span><span class="RktPn">)</span>
&#8212;<wbr></wbr> converts UTF-8 to UTF-16 on Unix and Mac OS X, where each UTF-16
code unit is a sequence of two bytes ordered by the current
platform&rsquo;s endianness. On Windows, the input can include
encodings that are not valid UTF-8, but which naturally extend the
UTF-8 encoding to support unpaired surrogate code units, and the
output is a sequence of UTF-16 code units (as little-endian byte
pairs), potentially including unpaired surrogates.</p></li><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="stt"> </span><span class="RktVal">"platform-UTF-8-permissive"</span><span class="stt"> </span><span class="RktVal">"platform-UTF-16"</span><span class="RktPn">)</span>
&#8212;<wbr></wbr> like <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="stt"> </span><span class="RktVal">"platform-UTF-8"</span><span class="stt"> </span><span class="RktVal">"platform-UTF-16"</span><span class="RktPn">)</span>,
but an input byte that is not part of a valid UTF-8 encoding
sequence (or valid for the unpaired-surrogate extension on
Windows) is effectively replaced with <span class="RktPn">(</span><span class="RktSym"><a href="characters.html#%28def._%28%28quote._~23~25kernel%29._char-~3einteger%29%29" class="RktValLink" data-pltdoc="x">char-&gt;integer</a></span><span class="stt"> </span><span class="RktVal">#\?</span><span class="RktPn">)</span>.</p></li><li><p><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="stt"> </span><span class="RktVal">"platform-UTF-16"</span><span class="stt"> </span><span class="RktVal">"platform-UTF-8"</span><span class="RktPn">)</span>
&#8212;<wbr></wbr> converts UTF-16 (bytes ordered by the current platform&rsquo;s
endianness) to UTF-8 on Unix and Mac OS X. On Windows, the input can
include UTF-16 code units that are unpaired surrogates, and the
corresponding output includes an encoding of each surrogate in a
natural extension of UTF-8. On Unix and Mac OS X, surrogates are
assumed to be paired: a pair of bytes with the bits <span class="RktVal">55296</span>
starts a surrogate pair, and the <span class="RktVal">1023</span> bits are used from
the pair and following pair (independent of the value of the
<span class="RktVal">56320</span> bits). On all platforms, performance may be poor
when decoding from an odd offset within an input byte string.</p></li></ul><p>A newly opened byte converter is registered with the current custodian
(see <a href="custodians.html" data-pltdoc="x">Custodians</a>), so that the converter is closed when
the custodian is shut down. A converter is not registered with a
custodian (and does not need to be closed) if it is one of the
guaranteed combinations not involving <span class="RktVal">""</span> on Unix, or if it
is any of the guaranteed combinations (including <span class="RktVal">""</span>) on
Windows and Mac OS X.</p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>In the Racket software distributions for Windows, a suitable
<span class="stt">"iconv.dll"</span> is included with <span class="stt">"libmzsch<span style="font-style: italic">VERS</span>.dll"</span>.</p></blockquote></blockquote></blockquote><p>The set of available encodings and combinations varies by platform,
depending on the <span class="stt">iconv</span> library that is installed; the
<span class="RktVar">from-name</span> and <span class="RktVar">to-name</span> arguments are passed on to
<span class="stt">iconv_open</span>. On Windows, <span class="stt">"iconv.dll"</span> or
<span class="stt">"libiconv.dll"</span> must be in the same directory as
<span class="stt">"libmzsch<span style="font-style: italic">VERS</span>.dll"</span> (where <span style="font-style: italic">VERS</span> is a version
number), in the user&rsquo;s path, in the system directory, or in the
current executable&rsquo;s directory at run time, and the DLL must either
supply <span class="stt">_errno</span> or link to <span class="stt">"msvcrt.dll"</span> for <span class="stt">_errno</span>;
otherwise, only the guaranteed combinations are available.</p><p>Use <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert%29%29" class="RktValLink" data-pltdoc="x">bytes-convert</a></span> with the result to convert byte strings.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-close-converter))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-close-converter%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-close-converter</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">converter</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void%29%29" class="RktValLink" data-pltdoc="x">void</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">converter</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-converter~3f%29%29" class="RktValLink" data-pltdoc="x">bytes-converter?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Closes the given converter, so that it can no longer be used with
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert%29%29" class="RktValLink" data-pltdoc="x">bytes-convert</a></span> or <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert-end%29%29" class="RktValLink" data-pltdoc="x">bytes-convert-end</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-convert))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-convert</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">converter</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">src-bstr</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span>[</td><td><span class="RktVar">src-start-pos</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">src-end-pos</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">dest-bstr</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">dest-start-pos</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">dest-end-pos</span>]<span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><table cellspacing="0" cellpadding="0"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">complete</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">continues</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">aborts</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">error</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">converter</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-converter~3f%29%29" class="RktValLink" data-pltdoc="x">bytes-converter?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">src-bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">src-start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">src-end-pos</span></td><td><span class="hspace">&nbsp;</span></td><td>:</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td>=</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">src-bstr</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">dest-bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">dest-start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">dest-end-pos</span></td><td><span class="hspace">&nbsp;</span></td><td>:</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td>=</td><td><span class="hspace">&nbsp;</span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="if.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._and%29%29" class="RktStxLink" data-pltdoc="x">and</a></span><span class="hspace">&nbsp;</span><span class="RktVar">dest-bstr</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">dest-bstr</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Converts the bytes from <span class="RktVar">src-start-pos</span> to <span class="RktVar">src-end-pos</span>
in <span class="RktVar">src-bstr</span>.</div></p><p>If <span class="RktVar">dest-bstr</span> is not <span class="RktVal">#f</span>, the converted bytes are
written into <span class="RktVar">dest-bstr</span> from <span class="RktVar">dest-start-pos</span> to
<span class="RktVar">dest-end-pos</span>. If <span class="RktVar">dest-bstr</span> is <span class="RktVal">#f</span>, then a
newly allocated byte string holds the conversion results, and if
<span class="RktVar">dest-end-pos</span> is not <span class="RktVal">#f</span>, the size of the result byte
string is no more than <span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._-%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-</span></a></span><span class="stt"> </span><span class="RktVar">dest-end-pos</span><span class="stt"> </span><span class="RktVar">dest-start-pos</span><span class="RktPn">)</span>.</p><p>The result of <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert%29%29" class="RktValLink" data-pltdoc="x">bytes-convert</a></span> is three values:</p><ul><li><p><span class="RktVar">result-bstr</span> or <span class="RktVar">dest-wrote-amt</span> &#8212;<wbr></wbr> a byte
string if <span class="RktVar">dest-bstr</span> is <span class="RktVal">#f</span> or not provided, or the
number of bytes written into <span class="RktVar">dest-bstr</span> otherwise.</p></li><li><p><span class="RktVar">src-read-amt</span> &#8212;<wbr></wbr> the number of bytes successfully converted
from <span class="RktVar">src-bstr</span>.</p></li><li><p><a name="(idx._(gentag._121._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">complete</span>, <a name="(idx._(gentag._122._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">continues</span>,
<a name="(idx._(gentag._123._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">aborts</span>, or <a name="(idx._(gentag._124._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">error</span> &#8212;<wbr></wbr> indicates
how conversion terminated:</p><ul><li><p><span class="RktVal">'</span><span class="RktVal">complete</span>: The entire input was processed, and
<span class="RktVar">src-read-amt</span> will be equal to <span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._-%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-</span></a></span><span class="stt"> </span><span class="RktVar">src-end-pos</span><span class="stt"> </span><span class="RktVar">src-start-pos</span><span class="RktPn">)</span>.</p></li><li><p><span class="RktVal">'</span><span class="RktVal">continues</span>: Conversion stopped due to the limit on
the result size or the space in <span class="RktVar">dest-bstr</span>; in this case,
fewer than <span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._-%29%29" class="RktValLink" data-pltdoc="x"><span class="nobreak">-</span></a></span><span class="stt"> </span><span class="RktVar">dest-end-pos</span><span class="stt"> </span><span class="RktVar">dest-start-pos</span><span class="RktPn">)</span> bytes may be
returned if more space is needed to process the next complete
encoding sequence in <span class="RktVar">src-bstr</span>.</p></li><li><p><span class="RktVal">'</span><span class="RktVal">aborts</span>: The input stopped part-way through an
encoding sequence, and more input bytes are necessary to continue.
For example, if the last byte of input is <span class="RktVal">195</span> for a
<span class="RktVal">"UTF-8-permissive"</span> decoding, the result is
<span class="RktVal">'</span><span class="RktVal">aborts</span>, because another byte is needed to determine how to
use the <span class="RktVal">195</span> byte.</p></li><li><p><span class="RktVal">'</span><span class="RktVal">error</span>: The bytes starting at <span class="RktPn">(</span><span class="RktSym"><a href="generic-numbers.html#%28def._%28%28quote._~23~25kernel%29._%2B%29%29" class="RktValLink" data-pltdoc="x">+</a></span><span class="stt"> </span><span class="RktVar">src-start-pos</span><span class="stt"> </span><span class="RktVar">src-read-amt</span><span class="RktPn">)</span> bytes in <span class="RktVar">src-bstr</span> do not form
a legal encoding sequence. This result is never produced for some
encodings, where all byte sequences are valid encodings. For
example, since <span class="RktVal">"UTF-8-permissive"</span> handles an invalid UTF-8
sequence by dropping characters or generating &ldquo;?,&rdquo; every byte
sequence is effectively valid.</p></li></ul></li></ul><p>Applying a converter accumulates state in the converter (even when the
third result of <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert%29%29" class="RktValLink" data-pltdoc="x">bytes-convert</a></span> is <span class="RktVal">'</span><span class="RktVal">complete</span>). This
state can affect both further processing of input and further
generation of output, but only for conversions that involve &ldquo;shift
sequences&rdquo; to change modes within a stream. To terminate an input
sequence and reset the converter, use <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert-end%29%29" class="RktValLink" data-pltdoc="x">bytes-convert-end</a></span>.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">convert</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"UTF-8"</span><span class="hspace">&nbsp;</span><span class="RktVal">"UTF-16"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert%29%29" class="RktValLink" data-pltdoc="x">bytes-convert</a></span><span class="hspace">&nbsp;</span><span class="RktSym">convert</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">65</span><span class="hspace">&nbsp;</span><span class="RktVal">66</span><span class="hspace">&nbsp;</span><span class="RktVal">67</span><span class="hspace">&nbsp;</span><span class="RktVal">68</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">#"\377\376A\0B\0C\0D\0"</span></p></td></tr><tr><td><p><span class="RktRes">4</span></p></td></tr><tr><td><p><span class="RktRes">'complete</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"\303\247\303\260\303\266\302\243"</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert%29%29" class="RktValLink" data-pltdoc="x">bytes-convert</a></span><span class="hspace">&nbsp;</span><span class="RktSym">convert</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">167</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">176</span><span class="hspace">&nbsp;</span><span class="RktVal">195</span><span class="hspace">&nbsp;</span><span class="RktVal">182</span><span class="hspace">&nbsp;</span><span class="RktVal">194</span><span class="hspace">&nbsp;</span><span class="RktVal">163</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td><p><span class="RktRes">#"\347\0\360\0\366\0\243\0"</span></p></td></tr><tr><td><p><span class="RktRes">8</span></p></td></tr><tr><td><p><span class="RktRes">'complete</span></p></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-close-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-close-converter</a></span><span class="hspace">&nbsp;</span><span class="RktSym">convert</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-convert-end))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert-end%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-convert-end</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">converter</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span>[</td><td><span class="RktVar">dest-bstr</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">dest-start-pos</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">dest-end-pos</span>]<span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><table cellspacing="0" cellpadding="0"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">complete</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">continues</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">converter</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-converter~3f%29%29" class="RktValLink" data-pltdoc="x">bytes-converter?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">dest-bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">dest-start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">dest-end-pos</span></td><td><span class="hspace">&nbsp;</span></td><td>:</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td>=</td><td><span class="hspace">&nbsp;</span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="if.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._and%29%29" class="RktStxLink" data-pltdoc="x">and</a></span><span class="hspace">&nbsp;</span><span class="RktVar">dest-bstr</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">dest-bstr</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert%29%29" class="RktValLink" data-pltdoc="x">bytes-convert</a></span>, but instead of converting bytes, this
procedure generates an ending sequence for the conversion (sometimes
called a &ldquo;shift sequence&rdquo;), if any. Few encodings use shift
sequences, so this function will succeed with no output for most
encodings. In any case, successful output of a (possibly empty) shift
sequence resets the converter to its initial state.</div></p><p>The result of <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-convert-end%29%29" class="RktValLink" data-pltdoc="x">bytes-convert-end</a></span> is two values:</p><ul><li><p><span class="RktVar">result-bstr</span> or <span class="RktVar">dest-wrote-amt</span> &#8212;<wbr></wbr> a byte string if
<span class="RktVar">dest-bstr</span> is <span class="RktVal">#f</span> or not provided, or the number of
bytes written into <span class="RktVar">dest-bstr</span> otherwise.</p></li><li><p><a name="(idx._(gentag._125._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">complete</span> or <a name="(idx._(gentag._126._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">continues</span> &#8212;<wbr></wbr>
indicates whether conversion completed. If <span class="RktVal">'</span><span class="RktVal">complete</span>, then
an entire ending sequence was produced. If <span class="RktVal">'</span><span class="RktVal">continues</span>, then
the conversion could not complete due to the limit on the result
size or the space in <span class="RktVar">dest-bstr</span>, and the first result is
either an empty byte string or <span class="RktVal">0</span>.</p></li></ul><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._bytes-converter~3f))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-converter~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-converter?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a <a href="#%28tech._byte._converter%29" class="techoutside" data-pltdoc="x"><span class="techinside">byte converter</span></a> produced
by <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span>, <span class="RktVal">#f</span> otherwise.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-converter~3f%29%29" class="RktValLink" data-pltdoc="x">bytes-converter?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"UTF-8"</span><span class="hspace">&nbsp;</span><span class="RktVal">"UTF-16"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-converter~3f%29%29" class="RktValLink" data-pltdoc="x">bytes-converter?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"whacky"</span><span class="hspace">&nbsp;</span><span class="RktVal">"not likely"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#f</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-open-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-open-converter</a></span><span class="hspace">&nbsp;</span><span class="RktVal">"UTF-8"</span><span class="hspace">&nbsp;</span><span class="RktVal">"UTF-16"</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-close-converter%29%29" class="RktValLink" data-pltdoc="x">bytes-close-converter</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-converter~3f%29%29" class="RktValLink" data-pltdoc="x">bytes-converter?</a></span><span class="hspace">&nbsp;</span><span class="RktSym">b</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#t</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((quote._~23~25kernel)._locale-string-encoding))"></a><span title="Provided from: racket/base, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._locale-string-encoding%29%29" class="RktValDef RktValLink" data-pltdoc="x">locale-string-encoding</a></span></span><span class="RktPn"></span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Returns a string for the current locale&rsquo;s encoding (i.e., the encoding
normally identified by <span class="RktVal">""</span>). See also
<span class="RktSym"><a href="runtime.html#%28def._%28%28quote._~23~25kernel%29._system-language%2Bcountry%29%29" class="RktValLink" data-pltdoc="x">system-language+country</a></span>.</div></p><h5 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-part-tag="&quot;Additional_Byte_String_Functions&quot;">4.4.5<tt>&nbsp;</tt><a name="(part._.Additional_.Byte_.String_.Functions)"></a><a name="(mod-path._racket/bytes)"></a>Additional Byte String Functions</h5><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._racket%2Fbytes%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/bytes</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The bindings documented in this section are provided by the <a href="#%28mod-path._racket%2Fbytes%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/bytes</span></a> and <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a> libraries, but not <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/bytes..rkt)._bytes-append*))"></a><span title="Provided from: racket/bytes, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fbytes..rkt%29._bytes-append%2A%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-append*</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">str</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="hspace">&nbsp;</span><span class="RktVar">strs</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">str</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">strs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-append%29%29" class="RktValLink" data-pltdoc="x">bytes-append</a></span>, but the last argument is used as a list
of arguments for <span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-append%29%29" class="RktValLink" data-pltdoc="x">bytes-append</a></span>, so <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fbytes..rkt%29._bytes-append%2A%29%29" class="RktValLink" data-pltdoc="x">bytes-append*</a></span><span class="stt"> </span><span class="RktVar">str</span><span class="stt"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="stt"> </span><span class="RktVar">strs</span><span class="RktPn">)</span> is the same as <span class="RktPn">(</span><span class="RktSym"><a href="procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._apply%29%29" class="RktValLink" data-pltdoc="x">apply</a></span><span class="stt"> </span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-append%29%29" class="RktValLink" data-pltdoc="x">bytes-append</a></span><span class="stt"> </span><span class="RktVar">str</span><span class="stt"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="stt"> </span><span class="RktVar">strs</span><span class="RktPn">)</span>.  In other words, the relationship between
<span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes-append%29%29" class="RktValLink" data-pltdoc="x">bytes-append</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fbytes..rkt%29._bytes-append%2A%29%29" class="RktValLink" data-pltdoc="x">bytes-append*</a></span> is similar to the
one between <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span> and <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%2A%29%29" class="RktValLink" data-pltdoc="x">list*</a></span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fbytes..rkt%29._bytes-append%2A%29%29" class="RktValLink" data-pltdoc="x">bytes-append*</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#"a"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"b"</span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">#"c"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"d"</span><span class="RktVal">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"abcd"</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fbytes..rkt%29._bytes-append%2A%29%29" class="RktValLink" data-pltdoc="x">bytes-append*</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28lib._racket%2Flist..rkt%29._append%2A%29%29" class="RktValLink" data-pltdoc="x">append*</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28lib._racket%2Fprivate%2Fmap..rkt%29._map%29%29" class="RktValLink" data-pltdoc="x">map</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._list%29%29" class="RktValLink" data-pltdoc="x">list</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#", "</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">#"Alpha"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"Beta"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"Gamma"</span><span class="RktVal">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><p><span class="RktRes">#"Alpha, Beta, Gamma"</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/bytes..rkt)._bytes-join))"></a><span title="Provided from: racket/bytes, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fbytes..rkt%29._bytes-join%29%29" class="RktValDef RktValLink" data-pltdoc="x">bytes-join</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">strs</span><span class="hspace">&nbsp;</span><span class="RktVar">sep</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">strs</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._listof%29%29" class="RktValLink" data-pltdoc="x">listof</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">sep</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Appends the byte strings in <span class="RktVar">strs</span>, inserting <span class="RktVar">sep</span> between
each pair of bytes in <span class="RktVar">strs</span>.</div></p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Example:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fbytes..rkt%29._bytes-join%29%29" class="RktValLink" data-pltdoc="x">bytes-join</a></span><span class="hspace">&nbsp;</span><span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">#"one"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"two"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"three"</span><span class="hspace">&nbsp;</span><span class="RktVal">#"four"</span><span class="RktVal">)</span><span class="hspace">&nbsp;</span><span class="RktVal">#" potato "</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#"one potato two potato three potato four"</span></p></td></tr></table></blockquote></td></tr></table></p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="strings.html" title="backward to &quot;4.3 Strings&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="data.html" title="up to &quot;4 Datatypes&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="characters.html" title="forward to &quot;4.5 Characters&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>