diff --git a/examples/string_47triml.janet b/examples/string_47triml.janet new file mode 100644 index 0000000..4d1250c --- /dev/null +++ b/examples/string_47triml.janet @@ -0,0 +1,8 @@ +# trim leading/left side whitespace +(string/triml " foo ") # -> "foo " + +# default whitespace includes " \t\r\n\v\f" +(string/triml "\t bar\n\r\f") # -> "bar\n\r\f" + +# provide custom set of characters to triml +(string/triml "_.foo_bar. \n" " ._\n") # -> "foo_bar. \n" \ No newline at end of file