concat

concat, function

def process concat(a: text): text
def const  pure concat(...t: _typ): text

Concatenates text. The process form concatenates the a values using an explicit ordering (sort or scan). The pure form concatenates the variadic values t after converting them to text.

Examples

table T = with
  [| as A, as B |]
  [| "hello ", "a" |]
  [| "hello ", "a" |]
  [| "hello ", "b" |]
  [| "world",  "b" |]

table G[gdim] = by T.B

show table "Groups" with
  gdim
  concat(T.A) sort T.A
  group by gdim

Output:

gdim concat(T.A)
a hello hello
b hello world
show table "Strings" with
  concat("0", 1, "2", 3) as "Digits"
  concat("Hello", " ") as "Hello+space"
  concat("Hello", " ", "World") as "Hello World"
  concat("Hello", " ", "World", "!") as "Greeting"

Output:

Digits Hello+space Hello World Greeting
0123 Hello Hello World Hello World!

Remarks

The process form requires sort or scan to define an ordering. Text values are limited to 256 characters in Envision.

See also

User Contributed Notes
0 notes + add a note