Navigation

Operators and Keywords

Function List:

C++ API

: strcat (s1, s2, …)

Return a string containing all the arguments concatenated horizontally.

If the arguments are cell strings, 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 for any character string input is eliminated before the strings are concatenated. Note that cell string values do not have whitespace trimmed.

For example:

strcat ("|", " leading space is preserved", "|")
    ⇒ |leading space is preserved|
strcat ("|", "trailing space is eliminated ", "|")
    ⇒ |trailing space is eliminated|
strcat ("homogeneous space |", "  ", "|is also eliminated")
    ⇒ homogeneous space ||is also eliminated
s = [ "ab"; "cde" ];
strcat (s, s, s)
    ⇒
        "ababab   "
        "cdecdecde"
s = { "ab"; "cd " };
strcat (s, s, s)
    ⇒
        {
          [1,1] = ababab
          [2,1] = cd cd cd
        }

See also: cstrcat, char, strvcat.

Package: octave