From 7a4f2e73addf6dfcde2a6b17b62b961608e556a0 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 9 Nov 2024 15:11:11 -0500 Subject: Rename `from_text()` to `parse()` --- docs/booleans.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'docs/booleans.md') diff --git a/docs/booleans.md b/docs/booleans.md index 4f44931a..80de6fa6 100644 --- a/docs/booleans.md +++ b/docs/booleans.md @@ -7,7 +7,7 @@ Boolean values have the type `Bool` and can be either `yes` ("true") or `no` This documentation provides details on boolean functions available in the API. -## `from_text` +## `parse` **Description:** Converts a string representation of a boolean value into a boolean. Acceptable @@ -16,7 +16,7 @@ boolean values are case-insensitive variations of `yes`/`no`, `y`/`n`, **Signature:** ```tomo -func from_text(text: Text -> Bool?) +func parse(text: Text -> Bool?) ``` **Parameters:** @@ -28,10 +28,10 @@ func from_text(text: Text -> Bool?) **Example:** ```tomo ->> Bool.from_text("yes") +>> Bool.parse("yes") = yes? ->> Bool.from_text("no") +>> Bool.parse("no") = no? ->> Bool.from_text("???") +>> Bool.parse("???") = !Bool ``` -- cgit v1.2.3