aboutsummaryrefslogtreecommitdiff
path: root/docs/bytes.md
blob: 7cbf7b0cdf871f642458f9bb2081dc50ca4ceb09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Byte Values

Byte values have the type `Byte`, which corresponds to an unsigned 8-bit
integer ranging from 0 to 255. It is generally recommended to use `Int8`
instead of `Byte` when performing math operations, however, `Byte`s are used in
API methods for `Text` and `Path` that deal with raw binary data, such as
`Path.read_bytes()` and `Text.bytes()`. Byte literals can be written using
the `Byte()` constructor: `Byte(5)`.

# Byte Methods

- [`func hex(byte: Byte, uppercase=no, prefix=yes -> Text)`](#hex)
- [`func parse(text: Text -> Byte?)`](#parse)
- [`func to(first: Byte, last: Byte, step: Int8? = none -> Text)`](#to)

---------

## `hex`

TODO: write docs

---------

## `parse`

TODO: write docs

---------

## `to`

TODO: write docs