public static final class QuotedString.GitPathStyle extends QuotedString
QuotedString.BourneStyle, QuotedString.BourneUserPathStyle, QuotedString.GitPathStyleBOURNE, 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.
|
dequotepublic String quote(String instr)
QuotedStringIf 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 QuotedStringinstr - any non-null Unicode string.public String dequote(byte[] in, int inPtr, int inEnd)
QuotedStringThis 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 QuotedStringin - the input buffer to parse.inPtr - first position within in to scan.inEnd - one position past in in to scan.Copyright © 2014. All rights reserved.