Mercurial > hg > octave-lyh
changeset 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 | 67b6b47a22f6 |
children | 93e5ade3fda4 |
files | scripts/strings/strcat.m |
diffstat | 1 files changed, 25 insertions(+), 1 deletions(-) [+] |
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{}