vncore / com.venuenext.vncore.http / PercentEncode / encode

encode

fun encode(s: String?, charset: Charset): String?

Encodes string with character set.

Parameters

s - the string to encode.

charset - the character set to encode.

Return
the encoded string.

@JvmOverloads fun encode(s: String, charset: String = "UTF-8"): String?

Encodes string with character set.

Parameters

s - the string to encode.

charset - the character set to encode, and defaults to UTF-8.

Return
the encoded string.