diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-09 15:11:11 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-09 15:11:11 -0500 |
| commit | 7a4f2e73addf6dfcde2a6b17b62b961608e556a0 (patch) | |
| tree | c03e4758e5725a4a6d352f5bb7d323796ed99947 /docs/integers.md | |
| parent | 5d35f286336878a3529dabdb3f7800b6f84712eb (diff) | |
Rename `from_text()` to `parse()`
Diffstat (limited to 'docs/integers.md')
| -rw-r--r-- | docs/integers.md | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/integers.md b/docs/integers.md index 16728c44..f5e6838b 100644 --- a/docs/integers.md +++ b/docs/integers.md @@ -154,14 +154,14 @@ The octal string representation of the integer. --- -## `from_text` +## `parse` **Description:** Converts a text representation of an integer into an integer. **Signature:** ```tomo -func from_text(text: Text -> Int?) +func parse(text: Text -> Int?) ``` **Parameters:** @@ -175,17 +175,17 @@ a null value will be returned. **Example:** ```tomo ->> Int.from_text("123") +>> Int.parse("123") = 123? ->> Int.from_text("0xFF") +>> Int.parse("0xFF") = 255? # Can't parse: ->> Int.from_text("asdf") +>> Int.parse("asdf") = !Int # Outside valid range: ->> Int8.from_text("9999999") +>> Int8.parse("9999999") = !Int ``` |
