public final class JSURLEncoder extends Object
encodeURI and encodeURIComponent.
When encoding a String, the following rules apply:
a" through "z",
"A" through "Z" and "0"
through "9" remain the same.
mark set in the case of encodeURIComponent, and
additionally those in the reserved set plus "#" in the case of
encodeURI; remain the same.
" is converted into a plus sign "
+".
%xy", where xy is the two-digit hexadecimal representation of the
byte. The default encoding scheme is UTF-8.
| Constructor and Description |
|---|
JSURLEncoder(boolean isSpecial) |
JSURLEncoder(boolean isSpecial,
Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
static char |
charForDigit(int digit,
int radix)
Like
Character.forDigit(int, int), but returns uppercase letters. |
com.oracle.truffle.api.strings.TruffleString |
encode(com.oracle.truffle.api.strings.TruffleString s) |
public JSURLEncoder(boolean isSpecial)
public JSURLEncoder(boolean isSpecial,
Charset charset)
public com.oracle.truffle.api.strings.TruffleString encode(com.oracle.truffle.api.strings.TruffleString s)
public static char charForDigit(int digit,
int radix)
Character.forDigit(int, int), but returns uppercase letters.