Mercurial > hg > octave-thorsten
changeset 11096:04c3aacbbc46
strjust.m: Clarify that justification applies to spaces and null characters.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Thu, 14 Oct 2010 06:48:02 -0700 |
parents | d4619eb6ef8e |
children | ffb2f1ef2097 |
files | scripts/ChangeLog scripts/strings/strjust.m |
diffstat | 2 files changed, 19 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-10-14 Ben Abbott <bpabbott@mac.com> + + * strings/strjust.m: Clarify that justification applies to spaces and + null characters. + 2010-10-09 Ben Abbott <bpabbott@mac.com> * plot/__go_draw_axes__.m: Enable linetypes for gnuplot.
--- a/scripts/strings/strjust.m +++ b/scripts/strings/strjust.m @@ -18,12 +18,20 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {} strjust (@var{s}, ["left"|"right"|"center"]) -## Shift the non-blank text of @var{s} to the left, right or center of -## the string. If @var{s} is a string array, justify each string in the -## array. Null characters are replaced by blanks. If no justification -## is specified, then all rows are right-justified. For example: +## @deftypefn {Function File} strjust (@var{s}) +## @deftypefnx {Function File} strjust (@var{s}, "right") +## Returns the text, S, justified to the right. +## +## @deftypefnx {Function File} strjust (@var{s}, "left") +## Returns left justified text. ## +## @deftypefnx {Function File} strjust (@var{s}, "center") +## Returns center justified text. +## +## Null characters are replaced by spaces. All other character +## data are treated as non-white space. +## +## Example: ## @example ## @group ## strjust (["a"; "ab"; "abc"; "abcd"]) @@ -34,6 +42,7 @@ ## abcd ## @end group ## @end example +## @seealso{deblank, strtrim} ## @end deftypefn function y = strjust (x, just)