str_cat(op1, op2)

String concatenation

This script returns a string that is the concatenation of the two operands given as input. Both operands can be  one  of  the  following  types: String, Boolean, Integer, Float, Pose, List of Boolean / Integer / Float / Pose. Any other type will raise an exception.

The resulting string cannot exceed 1023 characters, an exception is thrown otherwise.

Float numbers will be formatted with 6 decimals, and trailing zeros will be removed.

The function can be nested to create complex strings (see last example).

Parameters

op1: first operand

op2: second operand

Return Value

String concatenation of op1 and op2

Example command:

  • str_cat("Hello", " World!")
    • returns "Hello World!"
  • str_cat("Integer ", 1)
    • returns "Integer 1"
  • str_cat("", p[1.0, 2.0, 3.0, 4.0, 5.0, 6.0])
    • returns "p[1, 2, 3, 4, 5, 6]"
  • str_cat([True, False, True], [1, 0, 1])
    • returns "[True, False, True][1, 0, 1]"
  • str_cat(str_cat("", str_cat("One", "Two")),str_cat(3, 4))
    • returns "OneTwo34"