concat#

swordfish.function.concat()#

If X is a STRING/CHAR scalar

  • For an empty X,

    • if Y is an empty STRING/CHAR scalar, the function returns an empty string.

    • if Y is a non-empty STRING/CHAR scalar, the function returns Y.

  • Otherwise, the function forms a new string by combining X and Y regardless of whether Y is an empty string or not.

  • If X is a STRING/CHAR vector

    • For an empty X, the function returns an empty string.

    • Otherwise,

      • if Y is an empty STRING/CHAR scalar, the function concatenates each element in X and returns a string object;

      • if Y is a non-empty STRING/CHAR scalar, Y serves as the separator between the elements in vector X and the function returns a string object.

备注

The function concat implicitly converts all arguments to STRING type (null values to empty strings) before concatenation.

参数:
  • X (Constant) -- A STRING/CHAR scalar or vector.

  • Y (Constant) -- A STRING/CHAR scalar. If X or Y is not specified, it is treated as an empty string.

返回:

A STRING scalar.

返回类型:

Constant