diff options
author | Robert Attard <robert.attard@mail.mcgill.ca> | 2021-04-08 14:38:23 -0400 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2021-04-09 10:43:35 +0100 |
commit | 593eeae98d21da64d0e6a956413d3874fe762369 (patch) | |
tree | da24a4edc5b1003d36cd9678086ed29f3be60349 /test | |
parent | b9efa53231bfd3e4929208839f6fe913f4e1f69f (diff) | |
download | gleam_stdlib-593eeae98d21da64d0e6a956413d3874fe762369.tar.gz gleam_stdlib-593eeae98d21da64d0e6a956413d3874fe762369.zip |
rename string.drop_before to string.crop; use erl_contains instead of split_once and then concat
Diffstat (limited to 'test')
-rw-r--r-- | test/gleam/string_test.gleam | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/gleam/string_test.gleam b/test/gleam/string_test.gleam index b0e0fe6..3b1db57 100644 --- a/test/gleam/string_test.gleam +++ b/test/gleam/string_test.gleam @@ -204,24 +204,24 @@ pub fn slice_test() { |> should.equal("") } -pub fn drop_before_test() { +pub fn crop_test() { "gleam" - |> string.drop_before("gl") + |> string.crop("gl") |> should.equal("gleam") "gleam" - |> string.drop_before("le") + |> string.crop("le") |> should.equal("leam") - string.drop_before(from: "gleam", before: "ea") + string.crop(from: "gleam", before: "ea") |> should.equal("eam") "gleam" - |> string.drop_before("") + |> string.crop("") |> should.equal("gleam") "gleam" - |> string.drop_before("!") + |> string.crop("!") |> should.equal("gleam") } |