ProtoFlux:From UTF32: Difference between revisions

From Resonite Wiki
m little category typo hehe
style, formatting, link microsoft
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
|}}
|}}


From UTF32 is a ProtoFlux node that transforms a number in its respective UTF32 character, which can reside anywhere within [https://en.wikipedia.org/wiki/Unicode#Codespace_and_code_points valid Unicode codepoints].
The '''From UTF32''' node transforms a UTF32 codepoint into its respective UTF32 character.


== Inputs ==
== Inputs ==


=== UTF32 ([[Type:Int|int]]) ===
=== UTF32 ([[Type:int|int]]) ===


The Unicode codepoint, as decimal, to convert.
The Unicode codepoint, as a decimal integer, to convert.


== Outputs ==
== Outputs ==


=== * ([[Type:Char|char]]) ===
=== * ([[Type:string|string]]) ===


The resulting converted character. If the input does not reside within valid Unicode codepoints, a null string will be outputted.
The resulting converted character. If the input does not reside within [https://en.wikipedia.org/wiki/Unicode#Codespace_and_code_points valid Unicode codepoints], a null string will be outputted.
 
Note that, while the output of this will be one glyph, it will not always contain one singular <code>[[Type:char|char]]</code> element. Specifically, when the input extends past the [https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane Basic Multilingual Plane], a surrogate pair of <code>char</code>s will be output.
 
== See Also ==
* [https://learn.microsoft.com/en-us/dotnet/api/system.char.convertfromutf32 Microsoft documentation for the <code>Char.ConvertFromUtf32(Int32)</code> method.]


== Examples ==
== Examples ==
<gallery widths=480px heights=360px>
<gallery widths=480px heights=360px>
File:Protoflux example From UTF32 To UTF32.webp|alt=Four From UTF32 nodes are shown. The first has an input of 65903 and outputs a glyph. The second has an input of 55 and outputs a 7. The third has an input of 1114111 and outputs a nonexistent character, and the fourth has an input of 1114112 and outputs a null string.|Examples of the From UTF32 node and [[ProtoFlux:To_UTF32|To UTF32]] node, showcasing existing characters, valid but nonexistent characters, and invalid codepoints.
File:Protoflux example From UTF32 To UTF32.webp|alt=Four From UTF32 nodes are shown. The first has an input of 65903 and outputs a glyph. The second has an input of 55 and outputs a 7. The third has an input of 1114111 and outputs a nonexistent character, and the fourth has an input of 1114112 and outputs a null string.|Examples of the From UTF32 node and [[ProtoFlux:String To UTF32|String To UTF32]] node, showcasing existing characters, valid but nonexistent characters, and invalid codepoints.
</gallery>
</gallery>


[[Category:ProtoFlux:Strings:Characters]]
[[Category:ProtoFlux:Strings:Characters]]

Latest revision as of 20:13, 3 June 2024

From UTF32
UTF32
*
Characters

The From UTF32 node transforms a UTF32 codepoint into its respective UTF32 character.

Inputs

UTF32 (int)

The Unicode codepoint, as a decimal integer, to convert.

Outputs

* (string)

The resulting converted character. If the input does not reside within valid Unicode codepoints, a null string will be outputted.

Note that, while the output of this will be one glyph, it will not always contain one singular char element. Specifically, when the input extends past the Basic Multilingual Plane, a surrogate pair of chars will be output.

See Also

Examples