object PercentEncoding
source · line 10public
public object PercentEncoding
URI percent encoding for arbitrary bytes and UTF-8 text. A plus sign is ordinary data here; form encoding has a separate codec.
function encode
source · line 15public
public fun encode(bytes: List<Byte>): String
Percent-encodes arbitrary bytes, or the UTF-8 encoding of text, leaving only unreserved URI characters literal.
parameter bytes
source · line 15public
bytes: List<Byte>
function decodeUtf8
source · line 29public
public fun decodeUtf8(text: String): String
Decodes percent escapes and validates the result as UTF-8 text.
parameter text
source · line 29public
text: String
function decode
source · line 25public
public fun decode(text: String): Array<Byte>
Decodes percent escapes into arbitrary bytes. Malformed escapes are rejected; plus is not converted to space.
parameter text
source · line 25public
text: String
function encode
source · line 20public
public fun encode(text: String): String
Percent-encodes arbitrary bytes, or the UTF-8 encoding of text, leaving only unreserved URI characters literal.
parameter text
source · line 20public
text: String