Function Block ADDSLASHES

The Function Block ADDSLASHES adds a "\" before certain characters in the string STR (as in C).

Note: This function is Binary-Safe. This means that UTF8 characters cannot be processed directly.

Input STR

Defines the string to process.

Input CHARLIST

The input is a string with a list of all characters that should receive an escape. This is represented including the escape character. For example: "\n\r\t".

Note: These must be enclosed in double quotation marks.

A list of characters to escape. If CHARLIST contains characters like \n, \r etc., these are converted in C-style, while other non-alphanumeric characters with an ASCII value less than 32 or greater than 126 are converted to their octal representation.

If you note a character sequence at the input CHARLIST, inform yourself about which characters are between the first and last character.

The input can also define sequences:

CHARLIST Description
a..z All lowercase letters are masked.
A..Z All uppercase letters are masked.
A..z0..9 All uppercase and lowercase letters and all numbers are masked.
z..A Is faulty and masks A, z and the .