concat() | Zoho QEngine Help

concat()

In a nutshell
The concat() function takes a source text and an append text as arguments and returns a single string formed by joining them together. The return type is Text. It is useful in test scripts where you need to combine two text values into one.

Overview

The concat function takes a sourceText and an appendText as arguments and returns the concatenated value.

Return Type

  • TEXT

Syntax

  1. <variable> = <text1>.concat(<text2>);

(OR)

  1. <variable> = concat(<text1>, <text2>);

where,

ParameterData typeDescription
<variable>TEXTVariable which holds the concatenated value
<text1>TEXT

Piece of text to be concatenated

<text2>TEXT

Piece of text to be concatenated

Examples

  1.  text1 = "Zoho";
  2.  text2 = "QEngine";
  3.  result = text1.concat( text2);
  4.  info( concat(text1, text2) ); // yields "ZohoQEngine"
  5.  info( result ); // yields "ZohoQEngine"
  6.  info( text1.concat(" ").concat(text2) ); // yields "Zoho QEngine"