ScriptParser.EncodeStringLiteral

Encodes a string to be represented as a C# style string literal.

Example output: "Hello "Rick"!\r\nRock on"

public string EncodeStringLiteral(string plainString, bool addQuotes)

Parameters

plainString
string to encode

addQuotes
if true adds quotes around the encoded text