Create From UTF16 |
example & more details |
||
Line 12: | Line 12: | ||
|}} | |}} | ||
From UTF16 is a ProtoFlux node that | From UTF16 is a ProtoFlux node that transforms a number to its corresponding Unicode codepoint within the [https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane Basic Multilingual Plane]. | ||
== Inputs == | == Inputs == | ||
Line 18: | Line 18: | ||
=== UTF16 ([[Type:Int|int]]) === | === UTF16 ([[Type:Int|int]]) === | ||
The | The Unicode codepoint, as decimal, to convert. This must reside within the Basic Multilingual Plane (<code>0x0000-0xFFFF</code>). The output will "wrap around" at every multiple of 65536, essentially having an implicit modulo. | ||
== Outputs == | == Outputs == | ||
Line 24: | Line 24: | ||
=== * ([[Type:Char|char]]) === | === * ([[Type:Char|char]]) === | ||
The resulting converted | The resulting converted character. | ||
== Examples == | == Examples == | ||
<gallery widths=480px heights= | <gallery widths=480px heights=360px> | ||
File:Protoflux_example_From_UTF16.webp| | File:Protoflux_example_From_UTF16.webp|alt=Three "From UTF16" nodes are shown. The first has the input 19267 and outputs a chinese character. The second has the input "55" and outputs a 7 character. The third has the input "55 + 65536", and also outputs a 7 character.|Example of using From UTF16 in some ProtoFlux code, showcasing converting both ASCII and non-ASCII characters, as well as the wraparound behavior after 65536. | ||
</gallery> | </gallery> | ||
[[Category:ProtoFlux:Strings:Characters]] | [[Category:ProtoFlux:Strings:Characters]] |
Revision as of 20:01, 20 February 2024
From UTF16
Characters
From UTF16 is a ProtoFlux node that transforms a number to its corresponding Unicode codepoint within the Basic Multilingual Plane.
Inputs
UTF16 (int)
The Unicode codepoint, as decimal, to convert. This must reside within the Basic Multilingual Plane (0x0000-0xFFFF
). The output will "wrap around" at every multiple of 65536, essentially having an implicit modulo.
Outputs
* (char)
The resulting converted character.
Examples
-
Example of using From UTF16 in some ProtoFlux code, showcasing converting both ASCII and non-ASCII characters, as well as the wraparound behavior after 65536.