concat()

Read(264) Label: concat,

Here’s how to use concat() function.

concat()

Description:

Concatenate parameters into a string.

Syntax:

concat(xi,…)

Note:

The function concatenates parameters into a string in which quotation marks will not be used

Parameters:

xi

Any value that can be converted to a string; if it is a sequence, it will be broken up before concatenation.

Return value:

A string

Example:

 

A

 

1

=demo.query("select * from SCORES where SCORE>90")

 

2

=A1.(SCORE)

 

3

=A1.(SUBJECT)

 

4

=concat(A2,A3)

979691939797979691939797PEEnglishPEEnglishMathMathPEEnglishPEEnglishMathMath

5

=concat(2,3,"a")

23a

Related functions:

s.split()

A. concat( d )

Description:

Concatenate members of a sequence with the delimiter and return result as a string.

Syntax

A.concat(d)

Note:

The function concatenates members of A delimited by d and returns result as into a string; the sub-sequences of the string will be handled in a same way. Concatenate the members without a delimiter when parameter d is omitted.

Options:

@q

Add quotation marks to string members when concatenating them into a string. If this option is omitted, do not use the quotation marks.

@c

Concatenate with the comma

@i

Enclose string members to be concatenated with single quotes

Parameters:

A

A sequence of strings

d

Delimiter

Return value:

A string after concatenation

Example:

 

A

 

1

=[1, ["a","b"],[2,"c"]]

 

2

=A1.concat()

1[ab][2c]

3

=A1.concat(":")

1:[a:b]:[2:c]

4

=A1.concat@q()

1["a""b"][2"c"]

5

=A1.concat@c()

1,[a,b],[2,c]

6

=A1.concat@i()

1['a''b'][2'c']