diff scripts/strings/strcat.m @ 8442:502e58a0d44f

Fix docstrings, add examples, references and tests to string functions
author Thorsten Meyer <thorsten.meyier@gmx.de>
date Mon, 05 Jan 2009 08:11:03 +0100
parents 3a4694d67dbb
children fd11a08a9b31
line wrap: on
line diff
--- a/scripts/strings/strcat.m	Tue Dec 30 00:25:20 2008 -0500
+++ b/scripts/strings/strcat.m	Mon Jan 05 08:11:03 2009 +0100
@@ -19,16 +19,36 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} strcat (@var{s1}, @var{s2}, @dots{})
-## Return a string containing all the arguments concatenated.  For example,
+## Return a string containing all the arguments concatenated
+## 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.
+## For example,
 ##
 ## @example
 ## @group
 ## s = [ "ab"; "cde" ];
 ## strcat (s, s, s)
-##      @result{} "ab ab ab "
+##      @result{} ans =
+##         "ab ab ab "
 ##         "cdecdecde"
 ## @end group
 ## @end example
+##
+## @example
+## @group
+## s = @{ "ab"; "cde" @};
+## strcat (s, s, s)
+##      @result{} ans =
+##         @{
+##           [1,1] = ababab
+##           [2,1] = cdecdecde
+##         @}
+## @end group
+## @end example
+##
+## @seealso{cstrcat, char, strvcat}
 ## @end deftypefn
 
 ## Author: jwe