query
On this page

trim

lib.strings.trim

Docs pulled from | This Revision | 14 minutes ago


Remove leading and trailing whitespace from a string s.

Whitespace is defined as any of the following characters: " ", "\t" "\r" "\n"

Inputs

s
The string to trim

Type

trim :: string -> string

Examples

lib.strings.trim usage example

trim "   hello, world!   "
=> "hello, world!"

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

trim = trimWith {
    start = true;
    end = true;
  };