You are viewing an older version of the site. Click here to view the latest version of this page. (This may be a dead link, if so, try the root page of the docs here.)

char_from_unicode

Returns the unicode character for a given unicode value. This is meant for dynamic input that needs converting to a unicode character, if you're hardcoding it, you should just use '\u1234' syntax instead, however, this is the dynamic equivalent of the \u string escape, so '\u1234' == char_from_unicode(parse_int('1234', 16)) == char_from_unicode(0x1234). Despite the name, certain unicode escapes may return multiple characters, so there is no guarantee that length(char_from_unicode(@val)) will equal 1.

Vital Info

Name char_from_unicode
Returns string
Usages unicode
Throws ms.lang.CastException
ms.lang.RangeException
Since 3.3.1
Restricted
No
Optimizations CONSTANT_OFFLINE

Usages

char_from_unicode(unicode)

Examples

Example 1

Basic usage

Given the following code:

Copy Code
1   char_from_unicode(parse_int('2665', 16))

The output would be:

:♥

Find a bug in this page? Edit this page yourself, then submit a pull request. (Note this page is automatically generated from the documentation in the source code.)

··