Legend

Class
Struct
Enum
Interface
Delegate
Constructor
Method
Property
Event
Field

Extension method: string JsEscapeNull(this string, JsQuotes)

Declaration

public static string JsEscapeNull(
    this string input,
    JsQuotes quotes = JsQuotes.Double
)

Summary

Returns a JavaScript- or JSON-compatible representation of the string with the appropriate characters escaped. Returns "null" if the input is null.

Parameters

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

Returns

JavaScript- or JSON-compatible representation of the input string, or the "null" keyword if the input is null.