trim - luxembourg/muxcode-clm GitHub Wiki
TRIM()
FUNCTION: trim(<string> [,<trim style> [,<trim character>]])
This function will trim trailing and/or lead characters on the string that you specify. <trim character> specifies the character to trim (default is space), and <trim style> tells the kind of trimming to perform (default is trim both sides of the string).
The following values for <trim style> are recognized: 'b' : Trim both ends of the string (default) 'l' : Trim the left end of the string. 'r' : Trim the right end of the string. Note: anything else specified for <trim style> will trim both sides.
Example: > say trim(;;;Wacka;;;,,;) You say, "Wacka" > say trim(%b%b%b Polly Parrot %b%b%b%b,r) You say, " Polly Parrot" > say trim(---Trim Rules!---,l,-) You say, "Trim Rules!---"