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 ==
[[../objects/ms.lang.RangeException|ms.lang.RangeException]] |- ! scope="row" | Since | 3.3.1 |- ! scope="row" | Restricted |
Copy Code
The output would be:
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 ===
{| style="width: 40%;" cellspacing="1" cellpadding="1" border="1" class="wikitable"
|-
! scope="col" width="20%" |
! scope="col" width="80%" |
|-
! scope="row" | Name
| char_from_unicode
|-
! scope="row" | Returns
| string
|-
! scope="row" | Usages
| unicode
|-
! scope="row" | Throws
| [[../objects/ms.lang.CastException|ms.lang.CastException]][[../objects/ms.lang.RangeException|ms.lang.RangeException]] |- ! scope="row" | Since | 3.3.1 |- ! scope="row" | Restricted |
No
|-
! scope="row" | Optimizations
| [[../../Optimizer#CONSTANT_OFFLINE|CONSTANT_OFFLINE]]
|}
=== Usages ===
char_from_unicode(unicode)=== Examples === ====Example 1==== Basic usage Given the following code:
char_from_unicode(parse_int('2665', 16))

1 {{function|char_from_unicode}}({{function|parse_int}}('2665', 16))
:♥
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.)