ProtoFlux:Is Number: Difference between revisions

From Resonite Wiki
Created a page for the IsNumber node.
 
m fixup
Line 12: Line 12:
|}}
|}}


The <code>Is Number</code> node takes in a character literal and returns if that character is a number. Number characters are numbers that have a numeric value to them and can be a symbol.
The <code>Is Number</code> node takes in a character literal and returns if that character is a number.
 
== Examples ==
 
An easy way to remember this is: All digits are numbers, but not all numbers are digits.
- ½, ①, 1, 2, 3 count as numbers.
- 1, 2, 3 count as digits.


== Inputs ==
== Inputs ==


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


Line 29: Line 22:


=== * ([[Type:bool|bool]]) ===
=== * ([[Type:bool|bool]]) ===
Returns <code>true</code> if <code>Character</code> is a number, <code>false</code> otherwise.


Returns if this is a number.
== Examples ==
An easy way to remember the difference between this node and the [[ProtoFlux:Is Digit|Is Digit]] node is: All digits are numbers, but not all numbers are digits.
* ½, ①, 1, 2, 3 all count as numbers.
* 1, 2, 3 also count as digits.


== See Also ==
== See Also ==
 
* [https://learn.microsoft.com/en-us/dotnet/api/system.char.isnumber Microsoft documentation for the <code>Char.IsNumber</code> function].
Microsoft Documentation about the Char.IsNumber method. [https://learn.microsoft.com/en-us/dotnet/api/system.char.isnumber?view=net-8.0]
 
List of Unicode Characters of Category “Decimal Number”. [https://www.compart.com/en/unicode/category/Nd]
 
List of Unicode Characters of Category “Letter Number”. [https://www.compart.com/en/unicode/category/Nl]


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

Revision as of 20:45, 28 April 2024

Is Number
Character
*
Characters

The Is Number node takes in a character literal and returns if that character is a number.

Inputs

Character (char)

The character literal to check.

Outputs

* (bool)

Returns true if Character is a number, false otherwise.

Examples

An easy way to remember the difference between this node and the Is Digit node is: All digits are numbers, but not all numbers are digits.

  • ½, ①, 1, 2, 3 all count as numbers.
  • 1, 2, 3 also count as digits.

See Also