MarkupEntityCodec.sliceEncodedEntity

Parses content to see if it's an encoded entity string. The criteria are:

1. length of "entity" is at least 3

2. character 0 is '&'

3. a ';' between characters 1 and 16

4. no white space character or '&' before the first ';'

5. first ';' is after character 2

If "entity" complies with all of these, slice from the '&' to the ';' is returned, otherwise null.

class MarkupEntityCodec(E : IEntitySet)
protected
Char[]
sliceEncodedEntity
(
Char
)
(
Char[] text
)

Parameters

text Char[]

HTML entity string to parse

Return Value

Type: Char[]

The entity if parsing was successfull or null on failure.

Meta