MarkupEntityCodec.decodeNumericCharacterRef

Converts an encoded numeric character reference entity to a unicode character. Numeric character references are either:

&#<decimal Unicode>; or &#x<hexadecimal Unicode>;

(case insensitive)

class MarkupEntityCodec(E : IEntitySet)
protected
dchar
decodeNumericCharacterRef
(
Char
)
(
Char[] entity
)

Parameters

entity Char[]

entity content to convert; including leading "&#" and terminating ';'

Return Value

Type: dchar

the unicode character or InvalidUnicode on failure

Examples

Entity Character Unicode hex (dec) "&#65;" 'A' 0x41 (65) "&#xE1;" 'á' 0xE1 (225) "&#Xf1;" 'ñ' 0xF1 (241)

Meta