- Scilab Help
- Strings
- ascii
- asciimat
- blanks
- char
- convstr
- emptystr
- eval
- evstr
- grep
- isalphanum
- isascii
- isdigit
- isletter
- isnum
- justify
- length
- part
- regexp
- sci2exp
- strcat
- strchr
- strcmp
- strcmpi
- strcspn
- strindex
- string
- strings
- stripblanks
- strncpy
- strrchr
- strrev
- strsplit
- strspn
- strstr
- strsubst
- strtod
- strtok
- tokenpos
- tokens
Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function
strcat
concatenates character strings
Calling Sequence
txt = strcat(strings [,string_added]) txt = strcat(strings [,string_added, ["flag"]])
Arguments
- strings
a vector or matrix of strings.
- string_added
a string added, default value is the zero length character string
""
.- txt
a string.
- "flag"
a character (
"r"
for concatenation of rows in the matrixstrings
,"c"
for concatenations of columns in the matrixstrings
).
Description
txt = strcat(strings)
concatenates character strings:
txt = strings(1) + ... + strings(n)
.
txt = strcat(strings, string_added)
returns
txt = strings(1) + string_added + ... + string_added + strings(n)
.
The plus symbol does the same: "a"+"b"
is the
same as strcat(["a","b"]).
.
If the size of strings
is one, it returns
txt = strings(1)
;
strcat('A','B')
returns 'A'
and not
'AB'
as strcat(['A','B'])
.
If strings
is a matrix of strings
strcat(strings,"",'r')
returns a row vector of strings.
Entries of the row vector are result of concatenation of rows.
strcat(strings,"",'c')
returns a column vector of strings.
Entries of the column vector are result of concatenation of columns.
Examples
strcat(string(1:10),',') strcat(["a","b"]) strcat(["a","b"],'|') strcat('A') strcat('A','B') strcat(['A','B']) strcat(['A','B'],'') m =["a" "b" ; "c" "d"]; strcat(m, "r") strcat(m, "", "r") strcat(m, "", "c") strcat(m, "_and_", "r") strcat(m, "_and_", "c")
Report an issue | ||
<< sci2exp | Strings | strchr >> |