toScript

Escapes single quotes, double quotes, and backslashes in a string by preceding each with a backslash, allowing the string to be used more easily in scripting languages.

Syntax

toScript(string)

Parameters

string

Specifies the string to be converted (original string is not modified).

Returns

Returns a string in which the single quotes, double quotes, and backslashes are preceded with a backslash.