aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-19 13:30:45 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-19 13:30:45 -0500
commit4720ca7a5f3ad4bf2a04a6d28d671f03162149a9 (patch)
treea6385a8ad6f03b869e768b91220b2033631d6764 /docs
parentccada385c4fdc2dc320b0ab468c7413ff27bcc7d (diff)
Rename `Text.utf8_bytes` back to `Text.bytes`
Diffstat (limited to 'docs')
-rw-r--r--docs/bytes.md4
-rw-r--r--docs/text.md6
2 files changed, 5 insertions, 5 deletions
diff --git a/docs/bytes.md b/docs/bytes.md
index 0b618339..9453fac3 100644
--- a/docs/bytes.md
+++ b/docs/bytes.md
@@ -4,8 +4,8 @@ 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.utf8_bytes()`. Byte literals can be written as an
-integer with a `[B]` suffix, e.g. `255[B]`.
+`Path.read_bytes()` and `Text.bytes()`. Byte literals can be written using
+the `Byte()` constructor: `Byte(5)`.
# Byte Methods
diff --git a/docs/text.md b/docs/text.md
index d0179bc4..7557f05c 100644
--- a/docs/text.md
+++ b/docs/text.md
@@ -455,7 +455,7 @@ indices are counted from the back of the text, so `-1` means the last cluster,
---
-## `utf8_bytes`
+## `bytes`
**Description:**
Converts a `Text` value to an array of bytes representing a UTF8 encoding of
@@ -463,7 +463,7 @@ the text.
**Signature:**
```tomo
-func utf8_bytes(text: Text -> [Byte])
+func bytes(text: Text -> [Byte])
```
**Parameters:**
@@ -475,7 +475,7 @@ An array of bytes (`[Byte]`) representing the text in UTF8 encoding.
**Example:**
```tomo
->> "Amélie":utf8_bytes()
+>> "Amélie":bytes()
= [65[B], 109[B], 195[B], 169[B], 108[B], 105[B], 101[B]] : [Byte]
```