Ovid (>): > =item trim > > our Str multi Str::trim ( Str $string ) > > Removes leading and trailing whitespace from a string. > > =cut > > I could optionally make the following work: > > $string.trim(:leading<0>); > $string.trim(:trailing<0>); > > Setting leading or trailing to false (they default to true) would result in > either leading or trailing whitespace not being trimmed. Setting both to > false would be a no-op.
Unless someone protests loudly, I can add this to S29, and I (or someone else with tuits) can implement it in Rakudo. // Carl