fun String.decodeURLPart(start: Int = 0, end: Int = length, charset: <ERROR CLASS> = Charsets.UTF_8): String
Decode percent encoded URL part within the specified range [start, end). This function is not intended to decode urlencoded forms so it doesn't decode plus character to space. |
|
fun String.decodeURLQueryComponent(start: Int = 0, end: Int = length, plusIsSpace: Boolean = false, charset: <ERROR CLASS> = Charsets.UTF_8): String
Decode URL query component |
|
fun String.encodeOAuth(): String
Encode this in percent encoding specified here: https://tools.ietf.org/html/rfc5849#section-3.6 |
|
fun String.encodeURLParameter(spaceToPlus: Boolean = false): String
Encode this as query parameter key. |
|
fun String.encodeURLPath(): String
Encode URL path or component. It escapes all illegal or ambiguous characters |
|
fun String.encodeURLQueryComponent(encodeFull: Boolean = false, spaceToPlus: Boolean = false, charset: <ERROR CLASS> = Charsets.UTF_8): String
Encode url part as specified in https://tools.ietf.org/html/rfc3986#section-2 |
|
fun String.escapeIfNeeded(): String
Escape using double quotes if needed or keep as is if no dangerous strings found |
|
fun String.fromCookieToGmtDate(): GMTDate
Convert valid cookie date String to GMTDate trying first the RFC6265 standard, falling back on fromHttpToGmtDate |
|
fun String.fromHttpToGmtDate(): GMTDate
Convert valid http date String to GMTDate trying various http date formats from HTTP_DATE_FORMATS |
|
fun String.parseUrlEncodedParameters(defaultEncoding: <ERROR CLASS> = Charsets.UTF_8, limit: Int = 1000): Parameters
Parse URL query parameters. Shouldn't be used for urlencoded forms because of |
|
fun String.quote(): String
Escape string using double quotes |