DecodeHex
From Real Software Documentation
Method
Decodes the passed String into hex. Invalid hex values will be discarded.
Syntax
result=DecodeHex (s)
| Part | Type | Description |
|---|---|---|
| result | String | The passed string decoded into a hex string. |
| s | String | The string to be decoded into hex. |
Notes
Hexadecimal encoded strings are byte-based instead of character-based, i.e. they ignore text encodings. For example, the string "Real Studio™" is 12 characters long but, as it uses UTF-8 as encoding, it is 14 bytes long (the ™ character uses 3 bytes in UTF-8). You should keep that in mind when using EncodeHex and DecodeHex.
As of Real Studio 2011r2, only a hexadecimal string made from a UTF8 string will be transformed back properly by DecodeHex.
Examples
The following converts a hex string back into a letter.
