public static final class QuotedString.GitPathStyle extends QuotedString
QuotedString.BourneStyle, QuotedString.BourneUserPathStyle, QuotedString.GitPathStyle
BOURNE, BOURNE_USER_PATH, GIT_PATH
Modifier and Type | Method and Description |
---|---|
String |
dequote(byte[] in,
int inPtr,
int inEnd)
Decode a previously quoted input, scanning a UTF-8 encoded buffer.
|
String |
quote(String instr)
Quote an input string by the quoting rules.
|
dequote
public String quote(String instr)
QuotedString
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.
quote
in class QuotedString
instr
- any non-null Unicode string.public String dequote(byte[] in, int inPtr, int inEnd)
QuotedString
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
QuotedString.quote(String)
.
dequote
in class QuotedString
in
- the input buffer to parse.inPtr
- first position within in
to scan.inEnd
- one position past in in
to scan.Copyright © 2016 Eclipse JGit Project. All rights reserved.