in reply to Re: trimming space from both sides of a string
in thread trimming space from both sides of a string
It seems likely (without benchmarking) that those two substitutions (s/^\s.*//; s/\s.*$//;) are very efficient at removing leading and trailing white space. However the side effect of removing everything if there is leading or trailing white space may be too much of a price to pay for "efficiency"!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: trimming space from both sides of a string
by mr_mischief (Monsignor) on Oct 16, 2010 at 16:04 UTC | |
by jwkrahn (Abbot) on Oct 16, 2010 at 19:31 UTC |