tchmi_decode_control_characters

[ Function ]

function tchmi_decode_control_characters(text: string | null | undefined): string;

Converts a string like \n (symbol world) into a real line break (newline, HTML world). This function should be called for all values when texts within a control are to be written to the DOM.

Supports masking with \\n to display the string <backslash>+n.

Parameter

Name

Type

Description

text

string

The string to be masked

Return value

Type

Description

string

The coded representation of the parameter.

tchmi_decode_control_characters 1:

Available from version 1.12

Sample - JavaScript

TcHmi.Log.debug(tchmi_decode_control_characters('"Test"')); // ' \"Test\"'