Mercurial > octave-nkf
changeset 12867:a319f6835e9b stable
strtrim.m: Replace cellfun with regexprep call for 15X speedup
* strtrim.m: Replace cellfun with regexprep call for 15X speedup.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Fri, 22 Jul 2011 13:14:04 -0700 |
parents | 4c93cc41da15 |
children | b00181c65533 d5d3f04a645f |
files | scripts/strings/strtrim.m |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/strings/strtrim.m Sat Jul 16 20:56:20 2011 +0200 +++ b/scripts/strings/strtrim.m Fri Jul 22 13:14:04 2011 -0700 @@ -55,7 +55,7 @@ elseif (iscell(s)) - s = cellfun (@strtrim, s, "uniformoutput", false); + s = regexprep (s, '^\s+|\s+$', ''); else error ("strtrim: expecting string argument");