Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: void AppendJsEscaped(this StringBuilder, string, JsQuotes)

Declaration

public static void AppendJsEscaped(
    this StringBuilder sb,
    string input,
    JsQuotes quotes = JsQuotes.Double
)

Summary

Appends a JavaScript- or JSON-compatible representation of the string with the appropriate characters escaped into the specified StringBuilder.

Parameters

this StringBuildersb The StringBuilder to add the result to.
stringinput String to escape.
JsQuotesquotes Specifies what type of quotes to put around the result, if any.