C# Class GitSharp.Core.Util.QuotedString

Utility functions related to quoted string handling.
Afficher le fichier Open project: stschake/GitSharp

Méthodes publiques

Свойство Type Description
BOURNE BourneStyle
BOURNE_USER_PATH BourneUserPathStyle
GIT_PATH GitPathStyle

Méthodes publiques

Méthode Description
dequote ( byte instr, int offset, int end ) : string

Decode a previously quoted input, scanning a UTF-8 encoded buffer. This method must match quote such that: a.Equals(Dequote(Constants.encode(quote(a)))); is true for any a. This method removes any opening/closing quotation marks added by

dequote ( string instr ) : string

Clean a previously quoted input, decoding the result via UTF-8. This method must match quote such that: a.Equals(qequote(quote(a))); is true for any a.

quote ( string instr ) : string

Quote an input string by the quoting rules. If the input string does not require any quoting, the same String reference is returned to the caller. Otherwise a quoted string is returned, including the opening and closing quotation marks at the start and end of the string. If the style does not permit raw Unicode characters then the string will first be encoded in UTF-8, with unprintable sequences possibly escaped by the rules.

Method Details

dequote() public abstract méthode

Decode a previously quoted input, scanning a UTF-8 encoded buffer. This method must match quote such that: a.Equals(Dequote(Constants.encode(quote(a)))); is true for any a. This method removes any opening/closing quotation marks added by
public abstract dequote ( byte instr, int offset, int end ) : string
instr byte /// The input buffer to parse. ///
offset int /// First position within to scan. ///
end int /// One position past in to scan. ///
Résultat string

dequote() public méthode

Clean a previously quoted input, decoding the result via UTF-8. This method must match quote such that: a.Equals(qequote(quote(a))); is true for any a.
public dequote ( string instr ) : string
instr string a Unicode string to remove quoting from.
Résultat string

quote() public abstract méthode

Quote an input string by the quoting rules. If the input string does not require any quoting, the same String reference is returned to the caller. Otherwise a quoted string is returned, including the opening and closing quotation marks at the start and end of the string. If the style does not permit raw Unicode characters then the string will first be encoded in UTF-8, with unprintable sequences possibly escaped by the rules.
public abstract quote ( string instr ) : string
instr string any non-null Unicode string
Résultat string

Property Details

BOURNE public_oe static_oe property

Quoting style used by the Bourne shell. Quotes are unconditionally inserted during quote(string). This protects shell meta-characters like $ or ~ from being recognized as special.
public static BourneStyle BOURNE
Résultat BourneStyle

BOURNE_USER_PATH public_oe static_oe property

Bourne style, but permits ~user at the start of the string.
public static BourneUserPathStyle BOURNE_USER_PATH
Résultat BourneUserPathStyle

GIT_PATH public_oe static_oe property

Quoting style that obeys the rules Git applies to file names.
public static GitPathStyle GIT_PATH
Résultat GitPathStyle