# HG changeset patch # User Ben Abbott # Date 1287064082 25200 # Node ID 04c3aacbbc46ba38bcae330b0b1a7e113d151ac0 # Parent d4619eb6ef8e1e6df594eedf5168a003208fcf95 strjust.m: Clarify that justification applies to spaces and null characters. diff -r d4619eb6ef8e -r 04c3aacbbc46 scripts/ChangeLog --- a/scripts/ChangeLog Sat Oct 09 16:25:40 2010 -0400 +++ b/scripts/ChangeLog Thu Oct 14 06:48:02 2010 -0700 @@ -1,3 +1,8 @@ +2010-10-14 Ben Abbott + + * strings/strjust.m: Clarify that justification applies to spaces and + null characters. + 2010-10-09 Ben Abbott * plot/__go_draw_axes__.m: Enable linetypes for gnuplot. diff -r d4619eb6ef8e -r 04c3aacbbc46 scripts/strings/strjust.m --- a/scripts/strings/strjust.m Sat Oct 09 16:25:40 2010 -0400 +++ b/scripts/strings/strjust.m Thu Oct 14 06:48:02 2010 -0700 @@ -18,12 +18,20 @@ ## . ## -*- 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)