encodeURLPath

fun String.encodeURLPath(): String

Encode URL path or component. It escapes all illegal or ambiguous characters