aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gleam/string.gleam8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gleam/string.gleam b/src/gleam/string.gleam
index 3558dbb..91d54b4 100644
--- a/src/gleam/string.gleam
+++ b/src/gleam/string.gleam
@@ -310,6 +310,9 @@ pub fn join(strings: List(String), with separator: String) -> String {
//
// pub fn pad_right(string: String, to size: Int, with: String) {}
+pub external fn erl_trim(String) -> String =
+ "gleam_stdlib" "string_trim"
+
/// Get rid of whitespace on both sides of a String.
///
/// ## Examples
@@ -317,8 +320,9 @@ pub fn join(strings: List(String), with separator: String) -> String {
/// "hats"
///
///
-pub external fn trim(String) -> String =
- "gleam_stdlib" "string_trim"
+pub fn trim(string: String) -> String {
+ erl_trim(string)
+}
// TODO
// Get rid of whitespace on the left of a String.