aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Terpstra <erterpstra@gmail.com>2020-06-25 10:54:13 +0200
committerLouis Pilfold <louis@lpil.uk>2020-06-25 14:31:57 +0100
commitce82cffc8a03fed1e4421a0ba24bcd8652b48e77 (patch)
tree1e840537ae19a110afc148ebb80900fda3321cdb
parent609739f5f7793921d4bb802e66ef9eae4a8e61fa (diff)
downloadgleam_stdlib-ce82cffc8a03fed1e4421a0ba24bcd8652b48e77.tar.gz
gleam_stdlib-ce82cffc8a03fed1e4421a0ba24bcd8652b48e77.zip
Change let to assert
-rw-r--r--src/gleam/regex.gleam12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gleam/regex.gleam b/src/gleam/regex.gleam
index aa7d8a1..dc2a3f8 100644
--- a/src/gleam/regex.gleam
+++ b/src/gleam/regex.gleam
@@ -36,7 +36,7 @@ pub type FromStringError {
///
/// ## Examples
///
-/// > let Ok(re) = from_string("[0-9]")
+/// > assert Ok(re) = from_string("[0-9]")
/// > match(re, "abc123")
/// True
///
@@ -63,12 +63,12 @@ pub type Options {
/// ## Examples
///
/// > let options = Options(case_insensitive: False, multi_line: True)
-/// > let Ok(re) = from_string_with(options, "^[0-9]")
+/// > assert Ok(re) = from_string_with(options, "^[0-9]")
/// > match(re, "abc\n123")
/// True
///
/// > let options = Options(case_insensitive: True, multi_line: False)
-/// > let Ok(re) = from_string_with(options, "[A-Z]")
+/// > assert Ok(re) = from_string_with(options, "[A-Z]")
/// > match(re, "abc123")
/// True
///
@@ -82,7 +82,7 @@ pub external fn from_string_with(
///
/// ## Examples
///
-/// > let Ok(re) = from_string("^f.o.?")
+/// > assert Ok(re) = from_string("^f.o.?")
/// > match(re, "foo")
/// True
///
@@ -96,7 +96,7 @@ pub external fn match(Regex, String) -> Bool =
///
/// ## Examples
///
-/// > let Ok(re) = from_string(" *, *")
+/// > assert Ok(re) = from_string(" *, *")
/// > split(re, "foo,32, 4, 9 ,0")
/// ["foo", "32", "4", "9", "0"]
///
@@ -107,7 +107,7 @@ pub external fn split(Regex, String) -> List(String) =
///
/// ## Examples
///
-/// > let Ok(re) = regex.from_string("[oi]n a (\\w+)")
+/// > assert Ok(re) = regex.from_string("[oi]n a (\\w+)")
/// > regex.scan(re, "I am on a boat in a lake.")
/// [
/// Match(