Char extensions convert between characters and decimal Numeric Character References.
Extends string prototype with the following methods: char2dec, dec2char
This extensions doesn't depend on any other code or overwrite existing methods.
- char2dec() : String
Convert Character to Decimal.
Example:
"JavaScript".char2dec();
Result:
"JavaScript"
- dec2char() : String
Convert Decimal to Character.
Example:
"JavaScript".dec2char();
Result:
"JavaScript"