ProtoFlux:Is Surrogate: Difference between revisions

From Resonite Wiki
Created page with "{{#Invoke:ProtoFlux|GenerateUI |Name=Is Surrogate |Category=Characters |Inputs= [ {"Name":"Character", "Type":"char"} ] |Outputs= [ {"Name":"*", "Type":"bool"} ] |}} The <code>Is Surrogate</code> node takes in a Type:char and returns whether that char is a ''surrogate''. Surrogates are special values in UTF-16 that, in pairs, allows representing characters outside the [https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane Basic Multilingual P..."
 
m fixup
Line 12: Line 12:
|}}
|}}


The <code>Is Surrogate</code> node takes in a [[Type:char|char]] and returns whether that char is a ''surrogate''.  
The <code>Is Surrogate</code> node takes in a [[Type:char|char]] and returns whether that character is a surrogate.


Surrogates are special values in [[UTF-16]] that, in pairs, allows representing characters outside the [https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane Basic Multilingual Plane].
Surrogates are special values in [[UTF-16]] that, in pairs, allows representing characters outside the [https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane Basic Multilingual Plane].
Line 18: Line 18:
== Inputs ==
== Inputs ==


=== Character ([[Type:char|char]]) ===  
=== Character ([[Type:char|char]]) ===
 
The character to check.
The character to check.


Line 25: Line 24:


=== * ([[Type:bool|bool]]) ===
=== * ([[Type:bool|bool]]) ===
 
Returns true if <code>Character</code> is a surrogate, <code>false</code> otherwise. Surrogate characters recognized by this node are all characters between <code>0xD800</code> and <code>0xDFFF</code>.
Returns if this is a surrogate.


== See Also ==
== See Also ==
 
* [https://learn.microsoft.com/en-us/dotnet/api/system.char.issurrogate Microsoft Documentation about the <code>Char.IsSurrogate</code> method].
Microsoft Documentation about the <code>Char.IsSurrogate</code> method, which Resonite uses. [https://learn.microsoft.com/en-us/dotnet/api/system.char.issurrogate?view=net-8.0]


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

Revision as of 22:11, 28 April 2024

Is Surrogate
Character
*
Characters

The Is Surrogate node takes in a char and returns whether that character is a surrogate.

Surrogates are special values in UTF-16 that, in pairs, allows representing characters outside the Basic Multilingual Plane.

Inputs

Character (char)

The character to check.

Outputs

* (bool)

Returns true if Character is a surrogate, false otherwise. Surrogate characters recognized by this node are all characters between 0xD800 and 0xDFFF.

See Also