string.concat()

Concatenate two Strings.

Signature

concat(other: String) => String

Description

Concatenates two provided Strings. This method is equivalent to using the + operator with String operands.

The input Strings aren’t modified.

Parameters

Parameter Type Required Description

other

String

true

String to concatenate to the calling String.

Return value

Type Description

String

The resulting concatenated String.

Examples

Concatenate the calling String with the String "SUCCESS":

"HTTP/1.1 200 OK".concat(" SUCCESS")
"HTTP/1.1 200 OK SUCCESS"
\