spring-framework / org.springframework.web.util / UriUtils / encodeUserInfo

encodeUserInfo

open static fun encodeUserInfo(userInfo: String, encoding: String): String

Encode the given URI user info with the given encoding.

Parameters

userInfo - the user info to be encoded

encoding - the character encoding to encode to

Exceptions

UnsupportedEncodingException - when the given encoding parameter is not supported

Return
the encoded user info

open static fun encodeUserInfo(userInfo: String, charset: Charset): String

Encode the given URI user info with the given encoding.

Parameters

userInfo - the user info to be encoded

charset - the character encoding to encode to

Return
the encoded user info

Since
5.0