Mercurial > hg > octave-lyh
comparison 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 |
comparison
equal
deleted
inserted
replaced
8441:cc3ac5eb6be3 | 8442:502e58a0d44f |
---|---|
17 ## along with Octave; see the file COPYING. If not, see | 17 ## along with Octave; see the file COPYING. If not, see |
18 ## <http://www.gnu.org/licenses/>. | 18 ## <http://www.gnu.org/licenses/>. |
19 | 19 |
20 ## -*- texinfo -*- | 20 ## -*- texinfo -*- |
21 ## @deftypefn {Function File} {} strcat (@var{s1}, @var{s2}, @dots{}) | 21 ## @deftypefn {Function File} {} strcat (@var{s1}, @var{s2}, @dots{}) |
22 ## Return a string containing all the arguments concatenated. For example, | 22 ## Return a string containing all the arguments concatenated |
23 ## horizontally. If the arguments are cells strings, @code{strcat} | |
24 ## returns a cell string with the individual cells concatenated. | |
25 ## For numerical input, each element is converted to the | |
26 ## corresponding ASCII character. Trailing white space is eliminated. | |
27 ## For example, | |
23 ## | 28 ## |
24 ## @example | 29 ## @example |
25 ## @group | 30 ## @group |
26 ## s = [ "ab"; "cde" ]; | 31 ## s = [ "ab"; "cde" ]; |
27 ## strcat (s, s, s) | 32 ## strcat (s, s, s) |
28 ## @result{} "ab ab ab " | 33 ## @result{} ans = |
34 ## "ab ab ab " | |
29 ## "cdecdecde" | 35 ## "cdecdecde" |
30 ## @end group | 36 ## @end group |
31 ## @end example | 37 ## @end example |
38 ## | |
39 ## @example | |
40 ## @group | |
41 ## s = @{ "ab"; "cde" @}; | |
42 ## strcat (s, s, s) | |
43 ## @result{} ans = | |
44 ## @{ | |
45 ## [1,1] = ababab | |
46 ## [2,1] = cdecdecde | |
47 ## @} | |
48 ## @end group | |
49 ## @end example | |
50 ## | |
51 ## @seealso{cstrcat, char, strvcat} | |
32 ## @end deftypefn | 52 ## @end deftypefn |
33 | 53 |
34 ## Author: jwe | 54 ## Author: jwe |
35 | 55 |
36 function st = strcat (varargin) | 56 function st = strcat (varargin) |