C# Класс NGit.Util.QuotedString

Utility functions related to quoted string handling.
Utility functions related to quoted string handling.
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
BOURNE QuotedString.BourneStyle
BOURNE_USER_PATH QuotedString.BourneUserPathStyle
GIT_PATH QuotedString.GitPathStyle

Открытые методы

Метод Описание
Dequote ( byte @in, int offset, int end ) : string

Decode a previously quoted input, scanning a UTF-8 encoded buffer.

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 Quote(string) .

Dequote ( string @in ) : string

Clean a previously quoted input, decoding the result via UTF-8.

Clean a previously quoted input, decoding the result via UTF-8.

This method must match quote such that:

 a.equals(dequote(quote(a))); 
is true for any a.
Quote ( string @in ) : string

Quote an input string by the quoting rules.

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.

Описание методов

Dequote() публичный абстрактный Метод

Decode a previously quoted input, scanning a UTF-8 encoded buffer.
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 Quote(string) .

public abstract Dequote ( byte @in, int offset, int end ) : string
@in byte
offset int first position within in to scan.
end int one position past in in to scan.
Результат string

Dequote() публичный Метод

Clean a previously quoted input, decoding the result via UTF-8.
Clean a previously quoted input, decoding the result via UTF-8.

This method must match quote such that:

 a.equals(dequote(quote(a))); 
is true for any a.
public Dequote ( string @in ) : string
@in string
Результат string

Quote() публичный абстрактный Метод

Quote an input string by the quoting rules.
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 @in ) : string
@in string
Результат string

Описание свойств

BOURNE публичное статическое свойство

Quoting style used by the Bourne shell.
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 QuotedString.BourneStyle,NGit.Util BOURNE
Результат QuotedString.BourneStyle

BOURNE_USER_PATH публичное статическое свойство

Bourne style, but permits ~user at the start of the string.
Bourne style, but permits ~user at the start of the string.
public static QuotedString.BourneUserPathStyle,NGit.Util BOURNE_USER_PATH
Результат QuotedString.BourneUserPathStyle

GIT_PATH публичное статическое свойство

Quoting style that obeys the rules Git applies to file names
public static QuotedString.GitPathStyle,NGit.Util GIT_PATH
Результат QuotedString.GitPathStyle