Void trim(var String x, Bool(Char) fn=isSpace)
Arguments
x: The string to trimfn: The trimming function. Returns true if characters should be trimmed, false otherwise. The default function is Prelude::isSpace which trims whitespace.
Usage
Remove characters in-place from both ends of a String as determined by the trimming function.
str = " this string needs trimming ";
trim(str);
// str = "this string needs trimming";