diff options
author | Peter Saxton <peterhsaxton@gmail.com> | 2020-06-06 13:19:05 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2020-06-07 20:36:07 +0100 |
commit | 68fc81031ce4c5a4af9dca8a43b8906d70770e8e (patch) | |
tree | 4b92e2ce90ca5702f33a179be1907361f939adf4 /src | |
parent | 3a981f8d584baa621e659f45f80654710daea2b1 (diff) | |
download | gleam_stdlib-68fc81031ce4c5a4af9dca8a43b8906d70770e8e.tar.gz gleam_stdlib-68fc81031ce4c5a4af9dca8a43b8906d70770e8e.zip |
run the formatter
Diffstat (limited to 'src')
-rw-r--r-- | src/gleam/string.gleam | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gleam/string.gleam b/src/gleam/string.gleam index 3c49c87..740f90b 100644 --- a/src/gleam/string.gleam +++ b/src/gleam/string.gleam @@ -263,14 +263,16 @@ external fn erl_split(String, String) -> List(String) = /// > split_once("home/gleam/desktop/", on: "?") /// Error(Nil) /// -pub fn split_once(x: String, on substring: String) -> Result(tuple(String, String), Nil) { - case erl_split(x, substring) { - [first, rest] -> Ok(tuple(first, rest)) - _ -> Error(Nil) - } +pub fn split_once( + x: String, + on substring: String, +) -> Result(tuple(String, String), Nil) { + case erl_split(x, substring) { + [first, rest] -> Ok(tuple(first, rest)) + _ -> Error(Nil) + } } - /// Create a new string by joining two strings together. /// /// This function copies both strings and runs in linear time. If you find |