comparison 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
comparison
equal deleted inserted replaced
14819:67b6b47a22f6 14821:aad7d7ee8e8a
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 22 ## Return a string containing all the arguments concatenated
23 ## horizontally. If the arguments are cells strings, @code{strcat} 23 ## horizontally. If the arguments are cells strings, @code{strcat}
24 ## returns a cell string with the individual cells concatenated. 24 ## returns a cell string with the individual cells concatenated.
25 ## For numerical input, each element is converted to the 25 ## For numerical input, each element is converted to the
26 ## corresponding ASCII character. Trailing white space is eliminated. 26 ## corresponding ASCII character. Trailing white space for each of
27 ## the inputs (@var{s1}, @var{S2}, @dots{}) is eliminated before they
28 ## are concatenated.
29 ##
27 ## For example: 30 ## For example:
31 ##
32 ## @example
33 ## @group
34 ## strcat ("|", " leading space is preserved", "|")
35 ## @result{} | leading space is perserved|
36 ## @end group
37 ## @end example
38 ##
39 ## @example
40 ## @group
41 ## strcat ("|", "trailing space is eliminated ", "|")
42 ## @result{} |trailing space is eliminated|
43 ## @end group
44 ## @end example
45 ##
46 ## @example
47 ## @group
48 ## strcat ("homogeneous space |", " ", "| is also eliminated")
49 ## @result{} homogeneous space || is also eliminated
50 ## @end group
51 ## @end example
28 ## 52 ##
29 ## @example 53 ## @example
30 ## @group 54 ## @group
31 ## s = [ "ab"; "cde" ]; 55 ## s = [ "ab"; "cde" ];
32 ## strcat (s, s, s) 56 ## strcat (s, s, s)