Extensions for kotlin.String
fun String.decodeURLPart( 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( Decode URL query component |
|
Encode this in percent encoding specified here: https://tools.ietf.org/html/rfc5849#section-3.6 |
|
Encode this as query parameter |
|
Encode URL path or component. It escapes all illegal or ambiguous characters |
|
fun String.encodeURLQueryComponent( Encode url part as specified in https://tools.ietf.org/html/rfc3986#section-2 |
|
Escape using double quotes if needed or keep as is if no dangerous strings found |
|
fun String.fromHttpDateString(): ZonedDateTime Parse HTTP date to ZonedDateTime |
|
Convert valid http date String to GMTDate according to: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date format: <day-name>{3}, {2} {3} {4} {2}:{2}:{2} GMT String size should be equals 29 |
|
fun String.parseUrlEncodedParameters( Parse URL query parameters. Shouldn’t be used for urlencoded forms because of |
|
Escape string using double quotes |