unicodeAsInt()
This is one of several functions that EGL maintains for compatibility with I4GL. The strLib.unicodeAsInt() system function returns the Unicode code point (numeric representation) of a character as an INT.
The complementary function strLib.intAsUnicode() returns the Unicode character to which a code point refers.
strLib.unicodeAsInt(character UNICODE(1)? in)
returns (code INT?)
- character
- Input can be any variable or expression that is assignment compatible with the UNICODE type (see "Assignment compatibility in EGL"). This means, for example, that you can use a STRING variable as input, but the function evaluates only the first character.
- code
- The decimal value of the Unicode code point for character is returned as an INT. If character is null, the function returns a null value.
Example
source STRING = "ABC";
result INT;
result = strLib.unicodeAsInt(source);
// result is 65
Compatibility considerations
| Platform | Issue |
|---|---|
| JavaScript™ generation | The function strLib.unicodeAsInt() is not supported. |