String.pattern

Syntax

PP.String.pattern(string: String, replacers: Object, caseIndifferent: Boolean, noDataText: String);

Parameters

string. Substitution pattern, containing the variables %Value1, %Value2, and so on.

replacers. JSON object that contains values to substitute. Names of object properties match variables' names.

caseIndifferent. Indication of case insensitivity. If this parameter is True (default) letters case is ignored when executing this method, otherwise letters case is accounted for. Optional parameter.

noDataText. Text to replace null or undefined values. Optional parameter.

Description

The pattern static method replaces variables in a string with values.

Comments

This method returns a String-type value.

Example

The example of use is given in the with description of the String.format method.

PP