Stay organized with collections Save and categorize content based on your preferences.

blockly > utils > tokenizeInterpolation

utils.tokenizeInterpolation() function

Use **Blockly.utils.parsing.tokenizeInterpolation** instead.

Parse a string with any number of interpolation tokens (%1, %2, ...). It will also replace string table references (e.g., %{bky_my_msg} and %{BKY_MY_MSG} will both be replaced with the value in Msg['MY_MSG']). Percentage sign characters '%' may be self-escaped (e.g., '%%').

Signature:

export declare function tokenizeInterpolation(message: string): Array<string | number>;

Parameters

Parameter Type Description
message string Text which might contain string table references and interpolation tokens.

Returns:

Array<string | number>

Array of strings and numbers.