Here are types of string concatenation.
Description:
Join two or more strings end-to-end.
Syntax:
x+y
Note:
A string and a numeric value cannot be concatenated.
Parameter:
x |
A string constant |
y |
A string constant |
Return value:
A string formed by joining x and y.
Example:
"abc"+"def" |
abcdef |
"abc"+123 |
123. A string and a numeric value cannot be concatenated. |
Description:
Concatenate a string with one or more pieces of non-string data.
Syntax:
x/y
Note:
Either x or y is a string. The function will convert the non-string type one to a string before concatenating them to a larger one.
Parameter:
x |
Data of any type, with the condition that either x or y is a string. |
y |
Data of any type, with the condition that either x or y is a string. |
Return value:
A string
Example:
"abc"/12 |
abc12 |
date("2015-03-12")/"abc" |
2015-03-12abc |