Noogλe
search input
Function of the day
Remove leading and/or trailing whitespace from a string
s.To remove both leading and trailing whitespace, you can also use
trimWhitespace is defined as any of the following characters: " ", "\t" "\r" "\n"
Inputs
config(Attribute set)-
start- Whether to trim leading whitespace (
falseby default)
-
end- Whether to trim trailing whitespace (
falseby default)
s- The string to trim
Type
trimWith :: { start :: Bool; end :: Bool; } -> String -> StringExamples
lib.strings.trimWithusage exampletrimWith { start = true; } " hello, world! "} => "hello, world! " trimWith { end = true; } " hello, world! "} => " hello, world!"