merge

evaluates any expressions in a string, replaces them with their value, and returns the transformed string.

# Metadata

Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.1 Security:

# Syntax

merge(stringToEvaluate)

# Params

- stringToEvaluate : A string of any length, which may include expressions enclosed in double square brackets (expression) and return statements enclosed in "<?" and "?>" (<?return expression?>).

# Examples

merge("1+1 equals 1+1") -- returns "1+1 equals 2"

merge("The current folder is the defaultFolder")

# Description

The merge function evaluates any expressions in double square brackets, and replaces them with the expression value.

It also executes any return statements enclosed in "&lt;?" and "?&gt;", and replaces them by the value returned.

# Tags

# See

- **keyword:** string - **function:** value - **glossary:** statement, evaluate, return, expression - **control structure:** return, function