diff scripts/strings/strcat.m @ 14821:aad7d7ee8e8a

Clarify doc string for strcat. * scripts/strings/strcat.m: Clarify that the trailing spaces of the inputs are eliminated before the are concatentated.
author Ben Abbott <bpabbott@mac.com>
date Fri, 29 Jun 2012 17:23:19 -0400
parents f3d52523cde1
children 5d3a684236b0
line wrap: on
line diff
--- a/scripts/strings/strcat.m
+++ b/scripts/strings/strcat.m
@@ -23,11 +23,35 @@
 ## horizontally.  If the arguments are cells strings,  @code{strcat}
 ## returns a cell string with the individual cells concatenated.
 ## For numerical input, each element is converted to the
-## corresponding ASCII character.  Trailing white space is eliminated.
+## corresponding ASCII character.  Trailing white space for each of
+## the inputs (@var{s1}, @var{S2}, @dots{}) is eliminated before they
+## are concatenated.
+##
 ## For example:
 ##
 ## @example
 ## @group
+## strcat ("|", " leading space is preserved", "|")
+##     @result{} | leading space is perserved|
+## @end group
+## @end example
+##
+## @example
+## @group
+## strcat ("|", "trailing space is eliminated ", "|")
+##     @result{} |trailing space is eliminated|
+## @end group
+## @end example
+##
+## @example
+## @group
+## strcat ("homogeneous space |", "  ", "| is also eliminated")
+##     @result{} homogeneous space || is also eliminated
+## @end group
+## @end example
+##
+## @example
+## @group
 ## s = [ "ab"; "cde" ];
 ## strcat (s, s, s)
 ##     @result{}