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.)
== unicode_from_char ==
[[../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 code point for a given character. The character is a string, but it should only be 1 code point character (which may be length(@character) == 2).
=== Vital Info ===
{| style="width: 40%;" cellspacing="1" cellpadding="1" border="1" class="wikitable"
|-
! scope="col" width="20%" |
! scope="col" width="80%" |
|-
! scope="row" | Name
| unicode_from_char
|-
! scope="row" | Returns
| int
|-
! scope="row" | Usages
| character
|-
! 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
| None
|}
=== Usages ===
unicode_from_char(character)=== Examples === ====Example 1==== Basic usage Given the following code:
to_radix(unicode_from_char('\u2665'), 16)

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