Mercurial > hg > octave-nkf
diff scripts/strings/strtrim.m @ 12981:4ec4096f65d1
doc: State that required input is cellstr, not cell, for strtrim and deblank (Bug #34038)
NEWS: Note incompatible changes to certain string functions since 3.4.2
deblank.m, strtrim.m: Document that cellstr, not cell, is required input.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 21 Aug 2011 21:44:39 -0700 |
parents | f89449967f0d |
children | a1049e4480f8 |
line wrap: on
line diff
--- a/scripts/strings/strtrim.m +++ b/scripts/strings/strtrim.m @@ -20,18 +20,19 @@ ## @deftypefn {Function File} {} strtrim (@var{s}) ## Remove leading and trailing whitespace from @var{s}. If ## @var{s} is a matrix, @var{strtrim} trims each row to the length of -## longest string. If @var{s} is a cell array, operate recursively on -## each element of the cell array. For example: +## longest string. If @var{s} is a cell array of strings, operate recursively +## on each string element. For example: ## ## @example ## @group ## strtrim (" abc ") -## @result{} "abc" +## @result{} "abc" ## ## strtrim ([" abc "; " def "]) -## @result{} ["abc "; " def"] +## @result{} ["abc " ; " def"] ## @end group ## @end example +## @seealso{deblank} ## @end deftypefn ## Author: John Swensen <jpswensen@jhu.edu> @@ -73,4 +74,5 @@ %!error <Invalid call to strtrim> strtrim (); %!error <Invalid call to strtrim> strtrim ("abc", "def"); %!error <argument must be a string> strtrim (1); +%!error <argument must be a string> strtrim ({[]});