From 593eeae98d21da64d0e6a956413d3874fe762369 Mon Sep 17 00:00:00 2001 From: Robert Attard Date: Thu, 8 Apr 2021 14:38:23 -0400 Subject: rename string.drop_before to string.crop; use erl_contains instead of split_once and then concat --- test/gleam/string_test.gleam | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test') 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") } -- cgit v1.2.3