C# Class Microsoft.Automata.StringUtility

Provides some character escaping routines for strings.
Exibir arquivo Open project: AutomataDotNet/Automata Class Usage Examples

Public Methods

Method Description
Escape ( char c, bool useNumericRepresentationOnly = false ) : string

Make an escaped string from a character.

Escape ( string s ) : string

Makes an escaped string from a literal string s. Appends '\"' at the start and end of the encoded string.

Unescape ( string s ) : string

Unescapes any escaped characters in in the input string. (Same as System.Text.RegularExpressions.Regex.Unescape)

Private Methods

Method Description
EscapeWithNumericSpace ( char c ) : string

Make an escaped string from a character

ToUnicodeRepr ( int i ) : string

Method Details

Escape() public static method

Make an escaped string from a character.
public static Escape ( char c, bool useNumericRepresentationOnly = false ) : string
c char given character
useNumericRepresentationOnly bool if true then use numeric hexadecimal escaping of all characters
return string

Escape() public static method

Makes an escaped string from a literal string s. Appends '\"' at the start and end of the encoded string.
public static Escape ( string s ) : string
s string
return string

Unescape() public static method

Unescapes any escaped characters in in the input string. (Same as System.Text.RegularExpressions.Regex.Unescape)
public static Unescape ( string s ) : string
s string
return string