@grain/stdlib 0.7.0 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/array.md +491 -491
- package/bigint.md +198 -198
- package/buffer.gr +66 -1
- package/buffer.md +395 -272
- package/bytes.gr +1 -0
- package/bytes.md +200 -199
- package/char.md +125 -125
- package/exception.md +9 -9
- package/float32.md +195 -195
- package/float64.md +195 -195
- package/fs.md +115 -115
- package/hash.md +16 -16
- package/int16.md +155 -155
- package/int32.gr +1 -1
- package/int32.md +207 -207
- package/int64.gr +1 -1
- package/int64.md +207 -207
- package/int8.md +155 -155
- package/json.md +59 -59
- package/list.md +347 -347
- package/map.md +222 -222
- package/marshal.md +12 -12
- package/number.gr +119 -5
- package/number.md +503 -261
- package/option.md +141 -141
- package/package.json +2 -2
- package/path.gr +82 -65
- package/path.md +210 -141
- package/pervasives.md +238 -238
- package/priorityqueue.md +112 -112
- package/queue.md +117 -117
- package/random.md +37 -37
- package/range.md +36 -36
- package/rational.md +107 -107
- package/regex.md +91 -91
- package/result.md +102 -102
- package/runtime/atof/decimal.md +6 -6
- package/runtime/compare.md +7 -7
- package/runtime/dataStructures.md +178 -178
- package/runtime/equal.md +7 -7
- package/runtime/exception.md +15 -15
- package/runtime/malloc.md +9 -9
- package/runtime/numbers.md +269 -269
- package/runtime/string.md +17 -17
- package/runtime/unsafe/conv.md +6 -6
- package/runtime/unsafe/memory.gr +2 -19
- package/runtime/unsafe/memory.md +10 -10
- package/runtime/utf8.md +31 -31
- package/runtime/wasi.md +9 -9
- package/set.md +211 -211
- package/stack.md +122 -122
- package/string.md +228 -228
- package/uint16.md +148 -148
- package/uint32.md +192 -192
- package/uint64.md +192 -192
- package/uint8.md +148 -148
- package/uri.md +77 -77
- package/wasi/file.md +269 -269
- package/wasi/process.md +21 -21
- package/wasi/random.md +9 -9
- package/wasi/time.md +12 -12
package/bytes.md
CHANGED
|
@@ -40,15 +40,15 @@ Creates a new byte sequence of the input size.
|
|
|
40
40
|
|
|
41
41
|
Parameters:
|
|
42
42
|
|
|
43
|
-
|param|type|description|
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
| param | type | description |
|
|
44
|
+
| ------ | -------- | ---------------------------- |
|
|
45
|
+
| `size` | `Number` | The number of bytes to store |
|
|
46
46
|
|
|
47
47
|
Returns:
|
|
48
48
|
|
|
49
|
-
|type|description|
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
| type | description |
|
|
50
|
+
| ------- | --------------------- |
|
|
51
|
+
| `Bytes` | The new byte sequence |
|
|
52
52
|
|
|
53
53
|
Examples:
|
|
54
54
|
|
|
@@ -94,15 +94,15 @@ Creates a new byte sequence from the input string.
|
|
|
94
94
|
|
|
95
95
|
Parameters:
|
|
96
96
|
|
|
97
|
-
|param|type|description|
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
| param | type | description |
|
|
98
|
+
| -------- | -------- | --------------------------------------- |
|
|
99
|
+
| `string` | `String` | The string to copy into a byte sequence |
|
|
100
100
|
|
|
101
101
|
Returns:
|
|
102
102
|
|
|
103
|
-
|type|description|
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
| type | description |
|
|
104
|
+
| ------- | --------------------- |
|
|
105
|
+
| `Bytes` | The new byte sequence |
|
|
106
106
|
|
|
107
107
|
Examples:
|
|
108
108
|
|
|
@@ -125,15 +125,15 @@ Creates a new string from the input bytes.
|
|
|
125
125
|
|
|
126
126
|
Parameters:
|
|
127
127
|
|
|
128
|
-
|param|type|description|
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
| param | type | description |
|
|
129
|
+
| ------- | ------- | ------------------------ |
|
|
130
|
+
| `bytes` | `Bytes` | The source byte sequence |
|
|
131
131
|
|
|
132
132
|
Returns:
|
|
133
133
|
|
|
134
|
-
|type|description|
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
| type | description |
|
|
135
|
+
| -------- | -------------------------------------- |
|
|
136
|
+
| `String` | The string representation of the bytes |
|
|
137
137
|
|
|
138
138
|
Examples:
|
|
139
139
|
|
|
@@ -160,15 +160,15 @@ Returns the length of a byte sequence.
|
|
|
160
160
|
|
|
161
161
|
Parameters:
|
|
162
162
|
|
|
163
|
-
|param|type|description|
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
| param | type | description |
|
|
164
|
+
| ------- | ------- | ---------------------------- |
|
|
165
|
+
| `bytes` | `Bytes` | The byte sequence to inspect |
|
|
166
166
|
|
|
167
167
|
Returns:
|
|
168
168
|
|
|
169
|
-
|type|description|
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
| type | description |
|
|
170
|
+
| -------- | ------------------- |
|
|
171
|
+
| `Number` | The number of bytes |
|
|
172
172
|
|
|
173
173
|
Examples:
|
|
174
174
|
|
|
@@ -195,15 +195,15 @@ Creates a new byte sequence that contains the same bytes as the input byte seque
|
|
|
195
195
|
|
|
196
196
|
Parameters:
|
|
197
197
|
|
|
198
|
-
|param|type|description|
|
|
199
|
-
|
|
200
|
-
|
|
198
|
+
| param | type | description |
|
|
199
|
+
| ------- | ------- | ------------------------- |
|
|
200
|
+
| `bytes` | `Bytes` | The byte sequence to copy |
|
|
201
201
|
|
|
202
202
|
Returns:
|
|
203
203
|
|
|
204
|
-
|type|description|
|
|
205
|
-
|
|
206
|
-
|
|
204
|
+
| type | description |
|
|
205
|
+
| ------- | --------------------- |
|
|
206
|
+
| `Bytes` | The new byte sequence |
|
|
207
207
|
|
|
208
208
|
Examples:
|
|
209
209
|
|
|
@@ -226,17 +226,17 @@ Returns a copy of a subset of the input byte sequence.
|
|
|
226
226
|
|
|
227
227
|
Parameters:
|
|
228
228
|
|
|
229
|
-
|param|type|description|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
229
|
+
| param | type | description |
|
|
230
|
+
| -------- | -------- | ------------------------------------------------------- |
|
|
231
|
+
| `start` | `Number` | The start index |
|
|
232
|
+
| `length` | `Number` | The number of bytes to include after the starting index |
|
|
233
|
+
| `bytes` | `Bytes` | The byte sequence to copy from |
|
|
234
234
|
|
|
235
235
|
Returns:
|
|
236
236
|
|
|
237
|
-
|type|description|
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
| type | description |
|
|
238
|
+
| ------- | ---------------------------------------- |
|
|
239
|
+
| `Bytes` | A byte sequence with of the copied bytes |
|
|
240
240
|
|
|
241
241
|
Throws:
|
|
242
242
|
|
|
@@ -269,17 +269,17 @@ A positive number represents bytes to add, while a negative number represents by
|
|
|
269
269
|
|
|
270
270
|
Parameters:
|
|
271
271
|
|
|
272
|
-
|param|type|description|
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
272
|
+
| param | type | description |
|
|
273
|
+
| ------- | -------- | -------------------------------------------- |
|
|
274
|
+
| `left` | `Number` | The number of uninitialized bytes to prepend |
|
|
275
|
+
| `right` | `Number` | The number of uninitialized bytes to append |
|
|
276
|
+
| `bytes` | `Bytes` | The byte sequence get a subset of bytes from |
|
|
277
277
|
|
|
278
278
|
Returns:
|
|
279
279
|
|
|
280
|
-
|type|description|
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
| type | description |
|
|
281
|
+
| ------- | ----------------------- |
|
|
282
|
+
| `Bytes` | A resized byte sequence |
|
|
283
283
|
|
|
284
284
|
Throws:
|
|
285
285
|
|
|
@@ -311,13 +311,13 @@ in a destination byte sequence.
|
|
|
311
311
|
|
|
312
312
|
Parameters:
|
|
313
313
|
|
|
314
|
-
|param|type|description|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
314
|
+
| param | type | description |
|
|
315
|
+
| ---------- | -------- | --------------------------------------------------------- |
|
|
316
|
+
| `srcIndex` | `Number` | The starting index to copy bytes from |
|
|
317
|
+
| `dstIndex` | `Number` | The starting index to copy bytes into |
|
|
318
|
+
| `length` | `Number` | The amount of bytes to copy from the source byte sequence |
|
|
319
|
+
| `src` | `Bytes` | The source byte sequence |
|
|
320
|
+
| `dst` | `Bytes` | The destination byte sequence |
|
|
321
321
|
|
|
322
322
|
Throws:
|
|
323
323
|
|
|
@@ -349,16 +349,16 @@ Creates a new byte sequence that contains the bytes of both byte sequences.
|
|
|
349
349
|
|
|
350
350
|
Parameters:
|
|
351
351
|
|
|
352
|
-
|param|type|description|
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
352
|
+
| param | type | description |
|
|
353
|
+
| -------- | ------- | --------------------------- |
|
|
354
|
+
| `bytes1` | `Bytes` | The beginning byte sequence |
|
|
355
|
+
| `bytes2` | `Bytes` | The ending byte sequence |
|
|
356
356
|
|
|
357
357
|
Returns:
|
|
358
358
|
|
|
359
|
-
|type|description|
|
|
360
|
-
|
|
361
|
-
|
|
359
|
+
| type | description |
|
|
360
|
+
| ------- | --------------------- |
|
|
361
|
+
| `Bytes` | The new byte sequence |
|
|
362
362
|
|
|
363
363
|
Examples:
|
|
364
364
|
|
|
@@ -390,10 +390,10 @@ Replaces all bytes in a byte sequnce with the new value provided.
|
|
|
390
390
|
|
|
391
391
|
Parameters:
|
|
392
392
|
|
|
393
|
-
|param|type|description|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
393
|
+
| param | type | description |
|
|
394
|
+
| ------- | ------- | ----------------------------- |
|
|
395
|
+
| `value` | `Uint8` | The value replacing each byte |
|
|
396
|
+
| `bytes` | `Bytes` | The byte sequence to update |
|
|
397
397
|
|
|
398
398
|
Examples:
|
|
399
399
|
|
|
@@ -418,9 +418,9 @@ Replaces all bytes in a byte sequence with zeroes.
|
|
|
418
418
|
|
|
419
419
|
Parameters:
|
|
420
420
|
|
|
421
|
-
|param|type|description|
|
|
422
|
-
|
|
423
|
-
|
|
421
|
+
| param | type | description |
|
|
422
|
+
| ------- | ------- | -------------------------- |
|
|
423
|
+
| `bytes` | `Bytes` | The byte sequence to clear |
|
|
424
424
|
|
|
425
425
|
Examples:
|
|
426
426
|
|
|
@@ -446,22 +446,23 @@ Gets the UTF-8 encoded character at the given byte index.
|
|
|
446
446
|
|
|
447
447
|
Parameters:
|
|
448
448
|
|
|
449
|
-
|param|type|description|
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
449
|
+
| param | type | description |
|
|
450
|
+
| ------- | -------- | --------------------------- |
|
|
451
|
+
| `index` | `Number` | The byte index to access |
|
|
452
|
+
| `bytes` | `Bytes` | The byte sequence to access |
|
|
453
453
|
|
|
454
454
|
Returns:
|
|
455
455
|
|
|
456
|
-
|type|description|
|
|
457
|
-
|
|
458
|
-
|
|
456
|
+
| type | description |
|
|
457
|
+
| ------ | -------------------------------------------- |
|
|
458
|
+
| `Char` | The character that starts at the given index |
|
|
459
459
|
|
|
460
460
|
Throws:
|
|
461
461
|
|
|
462
462
|
`IndexOutOfBounds`
|
|
463
463
|
|
|
464
464
|
* When `index` is negative
|
|
465
|
+
* When `index + 1` is greater than the bytes size
|
|
465
466
|
|
|
466
467
|
`MalformedUnicode`
|
|
467
468
|
|
|
@@ -489,11 +490,11 @@ UTF-8 encodes a character starting at the given byte index.
|
|
|
489
490
|
|
|
490
491
|
Parameters:
|
|
491
492
|
|
|
492
|
-
|param|type|description|
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
493
|
+
| param | type | description |
|
|
494
|
+
| ------- | -------- | --------------------------- |
|
|
495
|
+
| `index` | `Number` | The byte index to update |
|
|
496
|
+
| `value` | `Char` | The value to set |
|
|
497
|
+
| `bytes` | `Bytes` | The byte sequence to mutate |
|
|
497
498
|
|
|
498
499
|
Throws:
|
|
499
500
|
|
|
@@ -532,16 +533,16 @@ Gets a signed 8-bit integer starting at the given byte index.
|
|
|
532
533
|
|
|
533
534
|
Parameters:
|
|
534
535
|
|
|
535
|
-
|param|type|description|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
536
|
+
| param | type | description |
|
|
537
|
+
| ------- | -------- | --------------------------- |
|
|
538
|
+
| `index` | `Number` | The byte index to access |
|
|
539
|
+
| `bytes` | `Bytes` | The byte sequence to access |
|
|
539
540
|
|
|
540
541
|
Returns:
|
|
541
542
|
|
|
542
|
-
|type|description|
|
|
543
|
-
|
|
544
|
-
|
|
543
|
+
| type | description |
|
|
544
|
+
| ------ | ----------------------------------------------------- |
|
|
545
|
+
| `Int8` | A signed 8-bit integer that starts at the given index |
|
|
545
546
|
|
|
546
547
|
Throws:
|
|
547
548
|
|
|
@@ -580,11 +581,11 @@ Sets a signed 8-bit integer starting at the given byte index.
|
|
|
580
581
|
|
|
581
582
|
Parameters:
|
|
582
583
|
|
|
583
|
-
|param|type|description|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
584
|
+
| param | type | description |
|
|
585
|
+
| ------- | -------- | --------------------------- |
|
|
586
|
+
| `index` | `Number` | The byte index to update |
|
|
587
|
+
| `value` | `Int8` | The value to set |
|
|
588
|
+
| `bytes` | `Bytes` | The byte sequence to mutate |
|
|
588
589
|
|
|
589
590
|
Throws:
|
|
590
591
|
|
|
@@ -623,16 +624,16 @@ Gets an unsigned 8-bit integer starting at the given byte index.
|
|
|
623
624
|
|
|
624
625
|
Parameters:
|
|
625
626
|
|
|
626
|
-
|param|type|description|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
627
|
+
| param | type | description |
|
|
628
|
+
| ------- | -------- | --------------------------- |
|
|
629
|
+
| `index` | `Number` | The byte index to access |
|
|
630
|
+
| `bytes` | `Bytes` | The byte sequence to access |
|
|
630
631
|
|
|
631
632
|
Returns:
|
|
632
633
|
|
|
633
|
-
|type|description|
|
|
634
|
-
|
|
635
|
-
|
|
634
|
+
| type | description |
|
|
635
|
+
| ------- | -------------------------------------------------------- |
|
|
636
|
+
| `Uint8` | An unsigned 8-bit integer that starts at the given index |
|
|
636
637
|
|
|
637
638
|
Throws:
|
|
638
639
|
|
|
@@ -664,11 +665,11 @@ Sets an unsigned 8-bit integer starting at the given byte index.
|
|
|
664
665
|
|
|
665
666
|
Parameters:
|
|
666
667
|
|
|
667
|
-
|param|type|description|
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
668
|
+
| param | type | description |
|
|
669
|
+
| ------- | -------- | --------------------------- |
|
|
670
|
+
| `index` | `Number` | The byte index to update |
|
|
671
|
+
| `value` | `Uint8` | The value to set |
|
|
672
|
+
| `bytes` | `Bytes` | The byte sequence to mutate |
|
|
672
673
|
|
|
673
674
|
Throws:
|
|
674
675
|
|
|
@@ -707,16 +708,16 @@ Gets a signed 16-bit integer starting at the given byte index.
|
|
|
707
708
|
|
|
708
709
|
Parameters:
|
|
709
710
|
|
|
710
|
-
|param|type|description|
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
711
|
+
| param | type | description |
|
|
712
|
+
| ------- | -------- | --------------------------- |
|
|
713
|
+
| `index` | `Number` | The byte index to access |
|
|
714
|
+
| `bytes` | `Bytes` | The byte sequence to access |
|
|
714
715
|
|
|
715
716
|
Returns:
|
|
716
717
|
|
|
717
|
-
|type|description|
|
|
718
|
-
|
|
719
|
-
|
|
718
|
+
| type | description |
|
|
719
|
+
| ------- | ------------------------------------------------------ |
|
|
720
|
+
| `Int16` | A signed 16-bit integer that starts at the given index |
|
|
720
721
|
|
|
721
722
|
Throws:
|
|
722
723
|
|
|
@@ -755,11 +756,11 @@ Sets a signed 16-bit integer starting at the given byte index.
|
|
|
755
756
|
|
|
756
757
|
Parameters:
|
|
757
758
|
|
|
758
|
-
|param|type|description|
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
759
|
+
| param | type | description |
|
|
760
|
+
| ------- | -------- | --------------------------- |
|
|
761
|
+
| `index` | `Number` | The byte index to update |
|
|
762
|
+
| `value` | `Int16` | The value to set |
|
|
763
|
+
| `bytes` | `Bytes` | The byte sequence to mutate |
|
|
763
764
|
|
|
764
765
|
Throws:
|
|
765
766
|
|
|
@@ -798,16 +799,16 @@ Gets an unsigned 16-bit integer starting at the given byte index.
|
|
|
798
799
|
|
|
799
800
|
Parameters:
|
|
800
801
|
|
|
801
|
-
|param|type|description|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
802
|
+
| param | type | description |
|
|
803
|
+
| ------- | -------- | --------------------------- |
|
|
804
|
+
| `index` | `Number` | The byte index to access |
|
|
805
|
+
| `bytes` | `Bytes` | The byte sequence to access |
|
|
805
806
|
|
|
806
807
|
Returns:
|
|
807
808
|
|
|
808
|
-
|type|description|
|
|
809
|
-
|
|
810
|
-
|
|
809
|
+
| type | description |
|
|
810
|
+
| -------- | --------------------------------------------------------- |
|
|
811
|
+
| `Uint16` | An unsigned 16-bit integer that starts at the given index |
|
|
811
812
|
|
|
812
813
|
Throws:
|
|
813
814
|
|
|
@@ -839,11 +840,11 @@ Sets an unsigned 16-bit integer starting at the given byte index.
|
|
|
839
840
|
|
|
840
841
|
Parameters:
|
|
841
842
|
|
|
842
|
-
|param|type|description|
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
843
|
+
| param | type | description |
|
|
844
|
+
| ------- | -------- | --------------------------- |
|
|
845
|
+
| `index` | `Number` | The byte index to update |
|
|
846
|
+
| `value` | `Uint16` | The value to set |
|
|
847
|
+
| `bytes` | `Bytes` | The byte sequence to mutate |
|
|
847
848
|
|
|
848
849
|
Throws:
|
|
849
850
|
|
|
@@ -875,16 +876,16 @@ Gets a signed 32-bit integer starting at the given byte index.
|
|
|
875
876
|
|
|
876
877
|
Parameters:
|
|
877
878
|
|
|
878
|
-
|param|type|description|
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
879
|
+
| param | type | description |
|
|
880
|
+
| ------- | -------- | --------------------------- |
|
|
881
|
+
| `index` | `Number` | The byte index to access |
|
|
882
|
+
| `bytes` | `Bytes` | The byte sequence to access |
|
|
882
883
|
|
|
883
884
|
Returns:
|
|
884
885
|
|
|
885
|
-
|type|description|
|
|
886
|
-
|
|
887
|
-
|
|
886
|
+
| type | description |
|
|
887
|
+
| ------- | ------------------------------------------------------ |
|
|
888
|
+
| `Int32` | A signed 32-bit integer that starts at the given index |
|
|
888
889
|
|
|
889
890
|
Throws:
|
|
890
891
|
|
|
@@ -916,11 +917,11 @@ Sets a signed 32-bit integer starting at the given byte index.
|
|
|
916
917
|
|
|
917
918
|
Parameters:
|
|
918
919
|
|
|
919
|
-
|param|type|description|
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
920
|
+
| param | type | description |
|
|
921
|
+
| ------- | -------- | --------------------------- |
|
|
922
|
+
| `index` | `Number` | The byte index to update |
|
|
923
|
+
| `value` | `Int32` | The value to set |
|
|
924
|
+
| `bytes` | `Bytes` | The byte sequence to mutate |
|
|
924
925
|
|
|
925
926
|
Throws:
|
|
926
927
|
|
|
@@ -952,16 +953,16 @@ Gets an unsigned 32-bit integer starting at the given byte index.
|
|
|
952
953
|
|
|
953
954
|
Parameters:
|
|
954
955
|
|
|
955
|
-
|param|type|description|
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
956
|
+
| param | type | description |
|
|
957
|
+
| ------- | -------- | --------------------------- |
|
|
958
|
+
| `index` | `Number` | The byte index to access |
|
|
959
|
+
| `bytes` | `Bytes` | The byte sequence to access |
|
|
959
960
|
|
|
960
961
|
Returns:
|
|
961
962
|
|
|
962
|
-
|type|description|
|
|
963
|
-
|
|
964
|
-
|
|
963
|
+
| type | description |
|
|
964
|
+
| -------- | --------------------------------------------------------- |
|
|
965
|
+
| `Uint32` | An unsigned 32-bit integer that starts at the given index |
|
|
965
966
|
|
|
966
967
|
Throws:
|
|
967
968
|
|
|
@@ -993,11 +994,11 @@ Sets an unsigned 32-bit integer starting at the given byte index.
|
|
|
993
994
|
|
|
994
995
|
Parameters:
|
|
995
996
|
|
|
996
|
-
|param|type|description|
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
997
|
+
| param | type | description |
|
|
998
|
+
| ------- | -------- | --------------------------- |
|
|
999
|
+
| `index` | `Number` | The byte index to update |
|
|
1000
|
+
| `value` | `Uint32` | The value to set |
|
|
1001
|
+
| `bytes` | `Bytes` | The byte sequence to mutate |
|
|
1001
1002
|
|
|
1002
1003
|
Throws:
|
|
1003
1004
|
|
|
@@ -1029,16 +1030,16 @@ Gets a 32-bit float starting at the given byte index.
|
|
|
1029
1030
|
|
|
1030
1031
|
Parameters:
|
|
1031
1032
|
|
|
1032
|
-
|param|type|description|
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1033
|
+
| param | type | description |
|
|
1034
|
+
| ------- | -------- | --------------------------- |
|
|
1035
|
+
| `index` | `Number` | The byte index to access |
|
|
1036
|
+
| `bytes` | `Bytes` | The byte sequence to access |
|
|
1036
1037
|
|
|
1037
1038
|
Returns:
|
|
1038
1039
|
|
|
1039
|
-
|type|description|
|
|
1040
|
-
|
|
1041
|
-
|
|
1040
|
+
| type | description |
|
|
1041
|
+
| --------- | --------------------------------------------- |
|
|
1042
|
+
| `Float32` | A 32-bit float that starts at the given index |
|
|
1042
1043
|
|
|
1043
1044
|
Throws:
|
|
1044
1045
|
|
|
@@ -1070,11 +1071,11 @@ Sets a 32-bit float starting at the given byte index.
|
|
|
1070
1071
|
|
|
1071
1072
|
Parameters:
|
|
1072
1073
|
|
|
1073
|
-
|param|type|description|
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1074
|
+
| param | type | description |
|
|
1075
|
+
| ------- | --------- | --------------------------- |
|
|
1076
|
+
| `index` | `Number` | The byte index to update |
|
|
1077
|
+
| `value` | `Float32` | The value to set |
|
|
1078
|
+
| `bytes` | `Bytes` | The byte sequence to mutate |
|
|
1078
1079
|
|
|
1079
1080
|
Throws:
|
|
1080
1081
|
|
|
@@ -1106,16 +1107,16 @@ Gets a signed 64-bit integer starting at the given byte index.
|
|
|
1106
1107
|
|
|
1107
1108
|
Parameters:
|
|
1108
1109
|
|
|
1109
|
-
|param|type|description|
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1110
|
+
| param | type | description |
|
|
1111
|
+
| ------- | -------- | --------------------------- |
|
|
1112
|
+
| `index` | `Number` | The byte index to access |
|
|
1113
|
+
| `bytes` | `Bytes` | The byte sequence to access |
|
|
1113
1114
|
|
|
1114
1115
|
Returns:
|
|
1115
1116
|
|
|
1116
|
-
|type|description|
|
|
1117
|
-
|
|
1118
|
-
|
|
1117
|
+
| type | description |
|
|
1118
|
+
| ------- | ------------------------------------------------------ |
|
|
1119
|
+
| `Int64` | A signed 64-bit integer that starts at the given index |
|
|
1119
1120
|
|
|
1120
1121
|
Throws:
|
|
1121
1122
|
|
|
@@ -1147,11 +1148,11 @@ Sets a signed 64-bit integer starting at the given byte index.
|
|
|
1147
1148
|
|
|
1148
1149
|
Parameters:
|
|
1149
1150
|
|
|
1150
|
-
|param|type|description|
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1151
|
+
| param | type | description |
|
|
1152
|
+
| ------- | -------- | --------------------------- |
|
|
1153
|
+
| `index` | `Number` | The byte index to update |
|
|
1154
|
+
| `value` | `Int64` | The value to set |
|
|
1155
|
+
| `bytes` | `Bytes` | The byte sequence to mutate |
|
|
1155
1156
|
|
|
1156
1157
|
Throws:
|
|
1157
1158
|
|
|
@@ -1183,16 +1184,16 @@ Gets an unsigned 64-bit integer starting at the given byte index.
|
|
|
1183
1184
|
|
|
1184
1185
|
Parameters:
|
|
1185
1186
|
|
|
1186
|
-
|param|type|description|
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1187
|
+
| param | type | description |
|
|
1188
|
+
| ------- | -------- | --------------------------- |
|
|
1189
|
+
| `index` | `Number` | The byte index to access |
|
|
1190
|
+
| `bytes` | `Bytes` | The byte sequence to access |
|
|
1190
1191
|
|
|
1191
1192
|
Returns:
|
|
1192
1193
|
|
|
1193
|
-
|type|description|
|
|
1194
|
-
|
|
1195
|
-
|
|
1194
|
+
| type | description |
|
|
1195
|
+
| -------- | --------------------------------------------------------- |
|
|
1196
|
+
| `Uint64` | An unsigned 64-bit integer that starts at the given index |
|
|
1196
1197
|
|
|
1197
1198
|
Throws:
|
|
1198
1199
|
|
|
@@ -1224,11 +1225,11 @@ Sets an unsigned 64-bit integer starting at the given byte index.
|
|
|
1224
1225
|
|
|
1225
1226
|
Parameters:
|
|
1226
1227
|
|
|
1227
|
-
|param|type|description|
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1228
|
+
| param | type | description |
|
|
1229
|
+
| ------- | -------- | --------------------------- |
|
|
1230
|
+
| `index` | `Number` | The byte index to update |
|
|
1231
|
+
| `value` | `Uint64` | The value to set |
|
|
1232
|
+
| `bytes` | `Bytes` | The byte sequence to mutate |
|
|
1232
1233
|
|
|
1233
1234
|
Throws:
|
|
1234
1235
|
|
|
@@ -1260,16 +1261,16 @@ Gets a 64-bit float starting at the given byte index.
|
|
|
1260
1261
|
|
|
1261
1262
|
Parameters:
|
|
1262
1263
|
|
|
1263
|
-
|param|type|description|
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1264
|
+
| param | type | description |
|
|
1265
|
+
| ------- | -------- | --------------------------- |
|
|
1266
|
+
| `index` | `Number` | The byte index to access |
|
|
1267
|
+
| `bytes` | `Bytes` | The byte sequence to access |
|
|
1267
1268
|
|
|
1268
1269
|
Returns:
|
|
1269
1270
|
|
|
1270
|
-
|type|description|
|
|
1271
|
-
|
|
1272
|
-
|
|
1271
|
+
| type | description |
|
|
1272
|
+
| --------- | --------------------------------------------- |
|
|
1273
|
+
| `Float64` | A 64-bit float that starts at the given index |
|
|
1273
1274
|
|
|
1274
1275
|
Throws:
|
|
1275
1276
|
|
|
@@ -1301,11 +1302,11 @@ Sets a 64-bit float starting at the given byte index.
|
|
|
1301
1302
|
|
|
1302
1303
|
Parameters:
|
|
1303
1304
|
|
|
1304
|
-
|param|type|description|
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1305
|
+
| param | type | description |
|
|
1306
|
+
| ------- | --------- | --------------------------- |
|
|
1307
|
+
| `index` | `Number` | The byte index to update |
|
|
1308
|
+
| `value` | `Float64` | The value to set |
|
|
1309
|
+
| `bytes` | `Bytes` | The byte sequence to mutate |
|
|
1309
1310
|
|
|
1310
1311
|
Throws:
|
|
1311
1312
|
|