Concatenate function
The function concat lets you concatenate all arguments without separators.
If any arguments are not strings, they are converted to strings:
- Any numbers are converted to strings.
- Booleans are converted to 1 or 0.
undefinedis converted to an empty string.
Example usages are provided below:
| Formula | Result | |
|---|---|---|
concat("foobar", "bar") | "foobarbar" | |
concat("foobar") | "foobar" | |
concat("foobar",0) | "foobar0" | |
concat(23) | "23" | |
concat(23.2323) | "23.2323" | |
concat(23,"133") | "23133" | |
concat([23,"133"],undefined,"XX",FALSE) | "23133XX0" (because undefined was converted into an empty string and FALSE was converted into 0) | |
concat(23,[[23,"133"],undefined,"XX",FALSE]],undefined,"XX",FALSE) | "2323133XX0XX0" | |
concat(23,2) | "232" | |
concat(55,undefined,"hello") | "55hello" |