Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.4.0 - Français

Change language to:
English - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Aide Scilab >> Chaînes de caractères > strcat

strcat

concatenate character strings

Calling Sequence

txt=strcat(vector_of_strings [,string_added])
txt=strcat(vector_of_strings [,string_added, ["flag"]])

Arguments

vector_of_strings

vector of strings

string_added

string added, default value is the emptystr ""

txt

string

"flag"

string ( "r" for return a row matrix, "c" for return a column matrix)

Description

txt=strcat(vector_of_strings) concatenates character strings : txt=vector_of_strings(1)+...+vector_of_strings(n)

txt=strcat(vector_of_strings,string_added) returns txt=vector_of_strings(1)+string_added+...+string_added+vector_of_strings(n).

The plus symbol does the same: "a"+"b" is the same as strcat(["a","b"]).

If size of vector_of_strings is one, it returns txt=vector_of_strings(1);

strcat('A','B') returns 'A' and not 'AB' as strcat(['A','B'])

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")

See Also

  • string — conversion en chaîne de caractères
  • strings — Scilab Object, character strings
Report an issue
<< sci2exp Chaînes de caractères strchr >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:37:26 CEST 2012