@grain/stdlib 0.7.0 → 0.7.1
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 +10 -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 +1 -1
- package/path.md +90 -90
- 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.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/uint32.md
CHANGED
|
@@ -32,15 +32,15 @@ Converts a Number to a Uint32.
|
|
|
32
32
|
|
|
33
33
|
Parameters:
|
|
34
34
|
|
|
35
|
-
|param|type|description|
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
| param | type | description |
|
|
36
|
+
| -------- | -------- | -------------------- |
|
|
37
|
+
| `number` | `Number` | The value to convert |
|
|
38
38
|
|
|
39
39
|
Returns:
|
|
40
40
|
|
|
41
|
-
|type|description|
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
| type | description |
|
|
42
|
+
| -------- | ---------------------------------- |
|
|
43
|
+
| `Uint32` | The Number represented as a Uint32 |
|
|
44
44
|
|
|
45
45
|
### Uint32.**toNumber**
|
|
46
46
|
|
|
@@ -57,15 +57,15 @@ Converts a Uint32 to a Number.
|
|
|
57
57
|
|
|
58
58
|
Parameters:
|
|
59
59
|
|
|
60
|
-
|param|type|description|
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
| param | type | description |
|
|
61
|
+
| ------- | -------- | -------------------- |
|
|
62
|
+
| `value` | `Uint32` | The value to convert |
|
|
63
63
|
|
|
64
64
|
Returns:
|
|
65
65
|
|
|
66
|
-
|type|description|
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
| type | description |
|
|
67
|
+
| -------- | ---------------------------------- |
|
|
68
|
+
| `Number` | The Uint32 represented as a Number |
|
|
69
69
|
|
|
70
70
|
### Uint32.**fromInt32**
|
|
71
71
|
|
|
@@ -82,15 +82,15 @@ Converts an Int32 to a Uint32.
|
|
|
82
82
|
|
|
83
83
|
Parameters:
|
|
84
84
|
|
|
85
|
-
|param|type|description|
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
| param | type | description |
|
|
86
|
+
| -------- | ------- | -------------------- |
|
|
87
|
+
| `number` | `Int32` | The value to convert |
|
|
88
88
|
|
|
89
89
|
Returns:
|
|
90
90
|
|
|
91
|
-
|type|description|
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
| type | description |
|
|
92
|
+
| -------- | --------------------------------- |
|
|
93
|
+
| `Uint32` | The Int32 represented as a Uint32 |
|
|
94
94
|
|
|
95
95
|
### Uint32.**reinterpretFloat32**
|
|
96
96
|
|
|
@@ -107,15 +107,15 @@ Interprets a Float32 as an Uint32.
|
|
|
107
107
|
|
|
108
108
|
Parameters:
|
|
109
109
|
|
|
110
|
-
|param|type|description|
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
| param | type | description |
|
|
111
|
+
| ------- | --------- | -------------------- |
|
|
112
|
+
| `value` | `Float32` | The value to convert |
|
|
113
113
|
|
|
114
114
|
Returns:
|
|
115
115
|
|
|
116
|
-
|type|description|
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
| type | description |
|
|
117
|
+
| -------- | ------------------------------------ |
|
|
118
|
+
| `Uint32` | The Float32 interpreted as an Uint32 |
|
|
119
119
|
|
|
120
120
|
Examples:
|
|
121
121
|
|
|
@@ -142,15 +142,15 @@ Increments the value by one.
|
|
|
142
142
|
|
|
143
143
|
Parameters:
|
|
144
144
|
|
|
145
|
-
|param|type|description|
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
| param | type | description |
|
|
146
|
+
| ------- | -------- | ---------------------- |
|
|
147
|
+
| `value` | `Uint32` | The value to increment |
|
|
148
148
|
|
|
149
149
|
Returns:
|
|
150
150
|
|
|
151
|
-
|type|description|
|
|
152
|
-
|
|
153
|
-
|
|
151
|
+
| type | description |
|
|
152
|
+
| -------- | --------------------- |
|
|
153
|
+
| `Uint32` | The incremented value |
|
|
154
154
|
|
|
155
155
|
### Uint32.**decr**
|
|
156
156
|
|
|
@@ -167,15 +167,15 @@ Decrements the value by one.
|
|
|
167
167
|
|
|
168
168
|
Parameters:
|
|
169
169
|
|
|
170
|
-
|param|type|description|
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
| param | type | description |
|
|
171
|
+
| ------- | -------- | ---------------------- |
|
|
172
|
+
| `value` | `Uint32` | The value to decrement |
|
|
173
173
|
|
|
174
174
|
Returns:
|
|
175
175
|
|
|
176
|
-
|type|description|
|
|
177
|
-
|
|
178
|
-
|
|
176
|
+
| type | description |
|
|
177
|
+
| -------- | --------------------- |
|
|
178
|
+
| `Uint32` | The decremented value |
|
|
179
179
|
|
|
180
180
|
### Uint32.**(+)**
|
|
181
181
|
|
|
@@ -192,16 +192,16 @@ Computes the sum of its operands.
|
|
|
192
192
|
|
|
193
193
|
Parameters:
|
|
194
194
|
|
|
195
|
-
|param|type|description|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
| param | type | description |
|
|
196
|
+
| ----- | -------- | ------------------ |
|
|
197
|
+
| `x` | `Uint32` | The first operand |
|
|
198
|
+
| `y` | `Uint32` | The second operand |
|
|
199
199
|
|
|
200
200
|
Returns:
|
|
201
201
|
|
|
202
|
-
|type|description|
|
|
203
|
-
|
|
204
|
-
|
|
202
|
+
| type | description |
|
|
203
|
+
| -------- | --------------------------- |
|
|
204
|
+
| `Uint32` | The sum of the two operands |
|
|
205
205
|
|
|
206
206
|
### Uint32.**(-)**
|
|
207
207
|
|
|
@@ -218,16 +218,16 @@ Computes the difference of its operands.
|
|
|
218
218
|
|
|
219
219
|
Parameters:
|
|
220
220
|
|
|
221
|
-
|param|type|description|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
221
|
+
| param | type | description |
|
|
222
|
+
| ----- | -------- | ------------------ |
|
|
223
|
+
| `x` | `Uint32` | The first operand |
|
|
224
|
+
| `y` | `Uint32` | The second operand |
|
|
225
225
|
|
|
226
226
|
Returns:
|
|
227
227
|
|
|
228
|
-
|type|description|
|
|
229
|
-
|
|
230
|
-
|
|
228
|
+
| type | description |
|
|
229
|
+
| -------- | ---------------------------------- |
|
|
230
|
+
| `Uint32` | The difference of the two operands |
|
|
231
231
|
|
|
232
232
|
### Uint32.**(*)**
|
|
233
233
|
|
|
@@ -244,16 +244,16 @@ Computes the product of its operands.
|
|
|
244
244
|
|
|
245
245
|
Parameters:
|
|
246
246
|
|
|
247
|
-
|param|type|description|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
247
|
+
| param | type | description |
|
|
248
|
+
| ----- | -------- | ------------------ |
|
|
249
|
+
| `x` | `Uint32` | The first operand |
|
|
250
|
+
| `y` | `Uint32` | The second operand |
|
|
251
251
|
|
|
252
252
|
Returns:
|
|
253
253
|
|
|
254
|
-
|type|description|
|
|
255
|
-
|
|
256
|
-
|
|
254
|
+
| type | description |
|
|
255
|
+
| -------- | ------------------------------- |
|
|
256
|
+
| `Uint32` | The product of the two operands |
|
|
257
257
|
|
|
258
258
|
### Uint32.**(/)**
|
|
259
259
|
|
|
@@ -270,16 +270,16 @@ Computes the quotient of its operands.
|
|
|
270
270
|
|
|
271
271
|
Parameters:
|
|
272
272
|
|
|
273
|
-
|param|type|description|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
273
|
+
| param | type | description |
|
|
274
|
+
| ----- | -------- | ------------------ |
|
|
275
|
+
| `x` | `Uint32` | The first operand |
|
|
276
|
+
| `y` | `Uint32` | The second operand |
|
|
277
277
|
|
|
278
278
|
Returns:
|
|
279
279
|
|
|
280
|
-
|type|description|
|
|
281
|
-
|
|
282
|
-
|
|
280
|
+
| type | description |
|
|
281
|
+
| -------- | ---------------------------- |
|
|
282
|
+
| `Uint32` | The quotient of its operands |
|
|
283
283
|
|
|
284
284
|
### Uint32.**rem**
|
|
285
285
|
|
|
@@ -296,16 +296,16 @@ Computes the remainder of the division of its operands.
|
|
|
296
296
|
|
|
297
297
|
Parameters:
|
|
298
298
|
|
|
299
|
-
|param|type|description|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
299
|
+
| param | type | description |
|
|
300
|
+
| ----- | -------- | ------------------ |
|
|
301
|
+
| `x` | `Uint32` | The first operand |
|
|
302
|
+
| `y` | `Uint32` | The second operand |
|
|
303
303
|
|
|
304
304
|
Returns:
|
|
305
305
|
|
|
306
|
-
|type|description|
|
|
307
|
-
|
|
308
|
-
|
|
306
|
+
| type | description |
|
|
307
|
+
| -------- | ----------------------------- |
|
|
308
|
+
| `Uint32` | The remainder of its operands |
|
|
309
309
|
|
|
310
310
|
### Uint32.**rotl**
|
|
311
311
|
|
|
@@ -322,16 +322,16 @@ Rotates the bits of the value left by the given number of bits.
|
|
|
322
322
|
|
|
323
323
|
Parameters:
|
|
324
324
|
|
|
325
|
-
|param|type|description|
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
325
|
+
| param | type | description |
|
|
326
|
+
| -------- | -------- | ------------------------------- |
|
|
327
|
+
| `value` | `Uint32` | The value to rotate |
|
|
328
|
+
| `amount` | `Uint32` | The number of bits to rotate by |
|
|
329
329
|
|
|
330
330
|
Returns:
|
|
331
331
|
|
|
332
|
-
|type|description|
|
|
333
|
-
|
|
334
|
-
|
|
332
|
+
| type | description |
|
|
333
|
+
| -------- | ----------------- |
|
|
334
|
+
| `Uint32` | The rotated value |
|
|
335
335
|
|
|
336
336
|
### Uint32.**rotr**
|
|
337
337
|
|
|
@@ -348,16 +348,16 @@ Rotates the bits of the value right by the given number of bits.
|
|
|
348
348
|
|
|
349
349
|
Parameters:
|
|
350
350
|
|
|
351
|
-
|param|type|description|
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
351
|
+
| param | type | description |
|
|
352
|
+
| -------- | -------- | ------------------------------- |
|
|
353
|
+
| `value` | `Uint32` | The value to rotate |
|
|
354
|
+
| `amount` | `Uint32` | The number of bits to rotate by |
|
|
355
355
|
|
|
356
356
|
Returns:
|
|
357
357
|
|
|
358
|
-
|type|description|
|
|
359
|
-
|
|
360
|
-
|
|
358
|
+
| type | description |
|
|
359
|
+
| -------- | ----------------- |
|
|
360
|
+
| `Uint32` | The rotated value |
|
|
361
361
|
|
|
362
362
|
### Uint32.**(<<)**
|
|
363
363
|
|
|
@@ -374,16 +374,16 @@ Shifts the bits of the value left by the given number of bits.
|
|
|
374
374
|
|
|
375
375
|
Parameters:
|
|
376
376
|
|
|
377
|
-
|param|type|description|
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
377
|
+
| param | type | description |
|
|
378
|
+
| -------- | -------- | ------------------------------ |
|
|
379
|
+
| `value` | `Uint32` | The value to shift |
|
|
380
|
+
| `amount` | `Uint32` | The number of bits to shift by |
|
|
381
381
|
|
|
382
382
|
Returns:
|
|
383
383
|
|
|
384
|
-
|type|description|
|
|
385
|
-
|
|
386
|
-
|
|
384
|
+
| type | description |
|
|
385
|
+
| -------- | ----------------- |
|
|
386
|
+
| `Uint32` | The shifted value |
|
|
387
387
|
|
|
388
388
|
### Uint32.**(>>>)**
|
|
389
389
|
|
|
@@ -400,16 +400,16 @@ Shifts the bits of the value right by the given number of bits.
|
|
|
400
400
|
|
|
401
401
|
Parameters:
|
|
402
402
|
|
|
403
|
-
|param|type|description|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
403
|
+
| param | type | description |
|
|
404
|
+
| -------- | -------- | ---------------------- |
|
|
405
|
+
| `value` | `Uint32` | The value to shift |
|
|
406
|
+
| `amount` | `Uint32` | The amount to shift by |
|
|
407
407
|
|
|
408
408
|
Returns:
|
|
409
409
|
|
|
410
|
-
|type|description|
|
|
411
|
-
|
|
412
|
-
|
|
410
|
+
| type | description |
|
|
411
|
+
| -------- | ----------------- |
|
|
412
|
+
| `Uint32` | The shifted value |
|
|
413
413
|
|
|
414
414
|
### Uint32.**(==)**
|
|
415
415
|
|
|
@@ -426,16 +426,16 @@ Checks if the first value is equal to the second value.
|
|
|
426
426
|
|
|
427
427
|
Parameters:
|
|
428
428
|
|
|
429
|
-
|param|type|description|
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
429
|
+
| param | type | description |
|
|
430
|
+
| ----- | -------- | ---------------- |
|
|
431
|
+
| `x` | `Uint32` | The first value |
|
|
432
|
+
| `y` | `Uint32` | The second value |
|
|
433
433
|
|
|
434
434
|
Returns:
|
|
435
435
|
|
|
436
|
-
|type|description|
|
|
437
|
-
|
|
438
|
-
|
|
436
|
+
| type | description |
|
|
437
|
+
| ------ | --------------------------------------------------------------------------- |
|
|
438
|
+
| `Bool` | `true` if the first value is equal to the second value or `false` otherwise |
|
|
439
439
|
|
|
440
440
|
### Uint32.**(!=)**
|
|
441
441
|
|
|
@@ -452,16 +452,16 @@ Checks if the first value is not equal to the second value.
|
|
|
452
452
|
|
|
453
453
|
Parameters:
|
|
454
454
|
|
|
455
|
-
|param|type|description|
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
455
|
+
| param | type | description |
|
|
456
|
+
| ----- | -------- | ---------------- |
|
|
457
|
+
| `x` | `Uint32` | The first value |
|
|
458
|
+
| `y` | `Uint32` | The second value |
|
|
459
459
|
|
|
460
460
|
Returns:
|
|
461
461
|
|
|
462
|
-
|type|description|
|
|
463
|
-
|
|
464
|
-
|
|
462
|
+
| type | description |
|
|
463
|
+
| ------ | ------------------------------------------------------------------------------- |
|
|
464
|
+
| `Bool` | `true` if the first value is not equal to the second value or `false` otherwise |
|
|
465
465
|
|
|
466
466
|
### Uint32.**eqz**
|
|
467
467
|
|
|
@@ -478,15 +478,15 @@ Checks if the given value is equal to zero.
|
|
|
478
478
|
|
|
479
479
|
Parameters:
|
|
480
480
|
|
|
481
|
-
|param|type|description|
|
|
482
|
-
|
|
483
|
-
|
|
481
|
+
| param | type | description |
|
|
482
|
+
| ------- | -------- | -------------------- |
|
|
483
|
+
| `value` | `Uint32` | The value to inspect |
|
|
484
484
|
|
|
485
485
|
Returns:
|
|
486
486
|
|
|
487
|
-
|type|description|
|
|
488
|
-
|
|
489
|
-
|
|
487
|
+
| type | description |
|
|
488
|
+
| ------ | --------------------------------------------------------------- |
|
|
489
|
+
| `Bool` | `true` if the first value is equal to zero or `false` otherwise |
|
|
490
490
|
|
|
491
491
|
### Uint32.**(<)**
|
|
492
492
|
|
|
@@ -503,16 +503,16 @@ Checks if the first value is less than the second value.
|
|
|
503
503
|
|
|
504
504
|
Parameters:
|
|
505
505
|
|
|
506
|
-
|param|type|description|
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
506
|
+
| param | type | description |
|
|
507
|
+
| ----- | -------- | ---------------- |
|
|
508
|
+
| `x` | `Uint32` | The first value |
|
|
509
|
+
| `y` | `Uint32` | The second value |
|
|
510
510
|
|
|
511
511
|
Returns:
|
|
512
512
|
|
|
513
|
-
|type|description|
|
|
514
|
-
|
|
515
|
-
|
|
513
|
+
| type | description |
|
|
514
|
+
| ------ | ---------------------------------------------------------------------------- |
|
|
515
|
+
| `Bool` | `true` if the first value is less than the second value or `false` otherwise |
|
|
516
516
|
|
|
517
517
|
### Uint32.**(>)**
|
|
518
518
|
|
|
@@ -529,16 +529,16 @@ Checks if the first value is greater than the second value.
|
|
|
529
529
|
|
|
530
530
|
Parameters:
|
|
531
531
|
|
|
532
|
-
|param|type|description|
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
532
|
+
| param | type | description |
|
|
533
|
+
| ----- | -------- | ---------------- |
|
|
534
|
+
| `x` | `Uint32` | The first value |
|
|
535
|
+
| `y` | `Uint32` | The second value |
|
|
536
536
|
|
|
537
537
|
Returns:
|
|
538
538
|
|
|
539
|
-
|type|description|
|
|
540
|
-
|
|
541
|
-
|
|
539
|
+
| type | description |
|
|
540
|
+
| ------ | ------------------------------------------------------------------------------- |
|
|
541
|
+
| `Bool` | `true` if the first value is greater than the second value or `false` otherwise |
|
|
542
542
|
|
|
543
543
|
### Uint32.**(<=)**
|
|
544
544
|
|
|
@@ -555,16 +555,16 @@ Checks if the first value is less than or equal to the second value.
|
|
|
555
555
|
|
|
556
556
|
Parameters:
|
|
557
557
|
|
|
558
|
-
|param|type|description|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
558
|
+
| param | type | description |
|
|
559
|
+
| ----- | -------- | ---------------- |
|
|
560
|
+
| `x` | `Uint32` | The first value |
|
|
561
|
+
| `y` | `Uint32` | The second value |
|
|
562
562
|
|
|
563
563
|
Returns:
|
|
564
564
|
|
|
565
|
-
|type|description|
|
|
566
|
-
|
|
567
|
-
|
|
565
|
+
| type | description |
|
|
566
|
+
| ------ | ---------------------------------------------------------------------------------------- |
|
|
567
|
+
| `Bool` | `true` if the first value is less than or equal to the second value or `false` otherwise |
|
|
568
568
|
|
|
569
569
|
### Uint32.**(>=)**
|
|
570
570
|
|
|
@@ -581,16 +581,16 @@ Checks if the first value is greater than or equal to the second value.
|
|
|
581
581
|
|
|
582
582
|
Parameters:
|
|
583
583
|
|
|
584
|
-
|param|type|description|
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
584
|
+
| param | type | description |
|
|
585
|
+
| ----- | -------- | ---------------- |
|
|
586
|
+
| `x` | `Uint32` | The first value |
|
|
587
|
+
| `y` | `Uint32` | The second value |
|
|
588
588
|
|
|
589
589
|
Returns:
|
|
590
590
|
|
|
591
|
-
|type|description|
|
|
592
|
-
|
|
593
|
-
|
|
591
|
+
| type | description |
|
|
592
|
+
| ------ | ------------------------------------------------------------------------------------------- |
|
|
593
|
+
| `Bool` | `true` if the first value is greater than or equal to the second value or `false` otherwise |
|
|
594
594
|
|
|
595
595
|
### Uint32.**lnot**
|
|
596
596
|
|
|
@@ -607,15 +607,15 @@ Computes the bitwise NOT of the given value.
|
|
|
607
607
|
|
|
608
608
|
Parameters:
|
|
609
609
|
|
|
610
|
-
|param|type|description|
|
|
611
|
-
|
|
612
|
-
|
|
610
|
+
| param | type | description |
|
|
611
|
+
| ------- | -------- | --------------- |
|
|
612
|
+
| `value` | `Uint32` | The given value |
|
|
613
613
|
|
|
614
614
|
Returns:
|
|
615
615
|
|
|
616
|
-
|type|description|
|
|
617
|
-
|
|
618
|
-
|
|
616
|
+
| type | description |
|
|
617
|
+
| -------- | ----------------------------------------------- |
|
|
618
|
+
| `Uint32` | Containing the inverted bits of the given value |
|
|
619
619
|
|
|
620
620
|
### Uint32.**(&)**
|
|
621
621
|
|
|
@@ -632,16 +632,16 @@ Computes the bitwise AND (`&`) on the given operands.
|
|
|
632
632
|
|
|
633
633
|
Parameters:
|
|
634
634
|
|
|
635
|
-
|param|type|description|
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
635
|
+
| param | type | description |
|
|
636
|
+
| ----- | -------- | ------------------ |
|
|
637
|
+
| `x` | `Uint32` | The first operand |
|
|
638
|
+
| `y` | `Uint32` | The second operand |
|
|
639
639
|
|
|
640
640
|
Returns:
|
|
641
641
|
|
|
642
|
-
|type|description|
|
|
643
|
-
|
|
644
|
-
|
|
642
|
+
| type | description |
|
|
643
|
+
| -------- | ----------------------------------------------------------------------------------------------- |
|
|
644
|
+
| `Uint32` | Containing a `1` in each bit position for which the corresponding bits of both operands are `1` |
|
|
645
645
|
|
|
646
646
|
### Uint32.**(|)**
|
|
647
647
|
|
|
@@ -658,16 +658,16 @@ Computes the bitwise OR (`|`) on the given operands.
|
|
|
658
658
|
|
|
659
659
|
Parameters:
|
|
660
660
|
|
|
661
|
-
|param|type|description|
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
661
|
+
| param | type | description |
|
|
662
|
+
| ----- | -------- | ------------------ |
|
|
663
|
+
| `x` | `Uint32` | The first operand |
|
|
664
|
+
| `y` | `Uint32` | The second operand |
|
|
665
665
|
|
|
666
666
|
Returns:
|
|
667
667
|
|
|
668
|
-
|type|description|
|
|
669
|
-
|
|
670
|
-
|
|
668
|
+
| type | description |
|
|
669
|
+
| -------- | --------------------------------------------------------------------------------------------------------- |
|
|
670
|
+
| `Uint32` | Containing a `1` in each bit position for which the corresponding bits of either or both operands are `1` |
|
|
671
671
|
|
|
672
672
|
### Uint32.**(^)**
|
|
673
673
|
|
|
@@ -684,16 +684,16 @@ Computes the bitwise XOR (`^`) on the given operands.
|
|
|
684
684
|
|
|
685
685
|
Parameters:
|
|
686
686
|
|
|
687
|
-
|param|type|description|
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
687
|
+
| param | type | description |
|
|
688
|
+
| ----- | -------- | ------------------ |
|
|
689
|
+
| `x` | `Uint32` | The first operand |
|
|
690
|
+
| `y` | `Uint32` | The second operand |
|
|
691
691
|
|
|
692
692
|
Returns:
|
|
693
693
|
|
|
694
|
-
|type|description|
|
|
695
|
-
|
|
696
|
-
|
|
694
|
+
| type | description |
|
|
695
|
+
| -------- | -------------------------------------------------------------------------------------------------------------- |
|
|
696
|
+
| `Uint32` | Containing a `1` in each bit position for which the corresponding bits of either but not both operands are `1` |
|
|
697
697
|
|
|
698
698
|
### Uint32.**clz**
|
|
699
699
|
|
|
@@ -710,15 +710,15 @@ Counts the number of leading zero bits in the value.
|
|
|
710
710
|
|
|
711
711
|
Parameters:
|
|
712
712
|
|
|
713
|
-
|param|type|description|
|
|
714
|
-
|
|
715
|
-
|
|
713
|
+
| param | type | description |
|
|
714
|
+
| ------- | -------- | -------------------- |
|
|
715
|
+
| `value` | `Uint32` | The value to inspect |
|
|
716
716
|
|
|
717
717
|
Returns:
|
|
718
718
|
|
|
719
|
-
|type|description|
|
|
720
|
-
|
|
721
|
-
|
|
719
|
+
| type | description |
|
|
720
|
+
| -------- | --------------------------- |
|
|
721
|
+
| `Uint32` | The amount of leading zeros |
|
|
722
722
|
|
|
723
723
|
### Uint32.**ctz**
|
|
724
724
|
|
|
@@ -735,15 +735,15 @@ Counts the number of trailing zero bits in the value.
|
|
|
735
735
|
|
|
736
736
|
Parameters:
|
|
737
737
|
|
|
738
|
-
|param|type|description|
|
|
739
|
-
|
|
740
|
-
|
|
738
|
+
| param | type | description |
|
|
739
|
+
| ------- | -------- | -------------------- |
|
|
740
|
+
| `value` | `Uint32` | The value to inspect |
|
|
741
741
|
|
|
742
742
|
Returns:
|
|
743
743
|
|
|
744
|
-
|type|description|
|
|
745
|
-
|
|
746
|
-
|
|
744
|
+
| type | description |
|
|
745
|
+
| -------- | ---------------------------- |
|
|
746
|
+
| `Uint32` | The amount of trailing zeros |
|
|
747
747
|
|
|
748
748
|
### Uint32.**popcnt**
|
|
749
749
|
|
|
@@ -760,13 +760,13 @@ Counts the number of bits set to `1` in the value, also known as a population co
|
|
|
760
760
|
|
|
761
761
|
Parameters:
|
|
762
762
|
|
|
763
|
-
|param|type|description|
|
|
764
|
-
|
|
765
|
-
|
|
763
|
+
| param | type | description |
|
|
764
|
+
| ------- | -------- | -------------------- |
|
|
765
|
+
| `value` | `Uint32` | The value to inspect |
|
|
766
766
|
|
|
767
767
|
Returns:
|
|
768
768
|
|
|
769
|
-
|type|description|
|
|
770
|
-
|
|
771
|
-
|
|
769
|
+
| type | description |
|
|
770
|
+
| -------- | ----------------------------------- |
|
|
771
|
+
| `Uint32` | The amount of 1-bits in its operand |
|
|
772
772
|
|