stripblanks(): an option "head"|"end"|"both" to trim only leading|trailing blanks (and tabs) would be useful
Reported by Samuel GOUGEON (@sgougeon)
BUG DESCRIPTION:
----------------
Presently, stripblanks() does not allow to remove only leading spaces of a set of strings, or only trailing ones.
An option "side=head|end|both" to do so would be welcome.
AFAIK, there is no vectorized workaround, unless using http://fileexchange.scilab.org/toolboxes/294000
For a SINGLE string s, we can remove:
* leading spaces and tabs : [tmp,tmp,tmp,t] = regexp(s,"/^\s*(.*)$/"); t
* trailing spaces and tabs: [tmp,tmp,tmp,t] = regexp(s,"/^(.*?)\s*$/"); t