aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilip Figiel <figiel.filip@gmail.com>2022-02-08 00:02:25 +0100
committerLouis Pilfold <louis@lpil.uk>2022-02-10 18:05:53 +0000
commit6aee94163a3167d5541f70b172fd00fe587344fa (patch)
tree3736c76a2530036d95ba7771b337a415367b8deb
parentd0de52e91d7c6b75a4cafc7d45afa486f87aaca3 (diff)
downloadgleam_stdlib-6aee94163a3167d5541f70b172fd00fe587344fa.tar.gz
gleam_stdlib-6aee94163a3167d5541f70b172fd00fe587344fa.zip
docs: improve string.to_option example
the `to_option("")` example was repeated twice, I figured it was a mistake. Other examples use the word hats so I added it here too.
-rw-r--r--src/gleam/string.gleam4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gleam/string.gleam b/src/gleam/string.gleam
index c624a30..889d2fc 100644
--- a/src/gleam/string.gleam
+++ b/src/gleam/string.gleam
@@ -675,8 +675,8 @@ pub fn utf_codepoint(value: Int) -> Result(UtfCodepoint, Nil) {
/// ```
///
/// ```gleam
-/// > to_option("")
-/// None
+/// > to_option("hats")
+/// Some("hats")
/// ```
///
pub fn to_option(s: String) -> Option(String) {