Skip to content

ProtoString toHex() Method

Seth Clydesdale edited this page May 23, 2015 · 4 revisions

<< Back to Conversion Methods

Example

Encoding each character in a text string as its Hexadecimal counterpart.

'Hello'.toHex(); // returns '48 65 6c 6c 6f'

Description

The toHex() method was used to encode all characters in a string as its Hexadecimal counterpart. This method was dropped, so it's recommended to use encodeAs() instead.

Syntax

String.toHex();

Information

You can find the source for the old conversion methods here.

Clone this wiki locally