JSStringFormat
Escapes special JavaScript characters, such as single quotation mark, double quotation mark, and newline
Method Signature
JSStringFormat(string=[string])
Arguments
Argument
Type
Required
Description
Default
string
string
true
The string to escape.
Examples
jsStringFormat Example
This example illustrates use of the JSStringFormat function.
string = "An example string value with ""quoted"" 'text'";
writeOutput( JSStringFormat( string ) );
Additional Examples
str = "Bob's comment was ""BL rocks!""";
writeOutput( str & "<br>" );
writeOutput( JSStringFormat( str ) );
Related
Last updated
Was this helpful?