Skip to content

ProtoString toEntity() Method

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

<< Back to Conversion Methods

Example

Encoding each character in a text string as an HTML entity number.

'&$♥♠♣'.toEntity(); // returns '&#38;&#36;&#9829;&#9824;&#9827;'

Description

The toEntity() method was used to encode all characters in a string as an HTML entity number. This method was dropped, so it's recommended to use encodeAs() instead.

Syntax

String.toEntity();

Information

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

Clone this wiki locally