You are here

encode

encode(String input) - these methods encode the input string into the specified encoding.

encode

encode(String input) - this method encodes the input string into the default encoding of UTF-8.

Parameters

input
A string to encode.

Returns

Returns the string encoded into UTF-8.

encode

encode(String input, String encoding) - this method encodes the input string into the specified encoding.

Parameters

input
A string to encode.
encoding
A string representing the encoding to use to encode the input string.

Returns

Returns the string encoded into the specified encoding.