C# Class Microsoft.Automata.StringUtility

Provides some character escaping routines for strings.
Afficher le fichier Open project: AutomataDotNet/Automata Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
EscapeWithNumericSpace ( char c ) : string

Make an escaped string from a character

ToUnicodeRepr ( int i ) : string

Method Details

Escape() public static méthode

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
Résultat string

Escape() public static méthode

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
Résultat string

Unescape() public static méthode

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