trim. Trimming letters

^string.trim[set]   [3.4.4]

The methods trims any characters from
set the beginning and the end of the string. By default it trims white space characters.
It can be specified, where to trim letters
from, by passing one of the values:
·both-trim from either the beginning or the end;  
·left or start-trim from the beginning;  
·right or end-trim from the end.  

Parameter set specifies which characters to trim.

Example: white space trimming
$name[ Bob ]

Will output…
" Bob "

Example: trimming custom letters

Will output…

Copyright © 1997–2021 Art. Lebedev Studio | Last updated: 04.04.2016