Created a page for the IsNumber node. |
Add is digit to see also |
||
(3 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
|}} | |}} | ||
The | The '''Is Number''' node takes in a character literal and returns if that character is a number. | ||
== 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. Numbers recognized by this node are given the Unicode delegation [https://www.compart.com/en/unicode/category/Nd <code>Nd</code>], [https://www.compart.com/en/unicode/category/Nl <code>Nl</code>], or [https://www.compart.com/en/unicode/category/No <code>No</code>]. | |||
== 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 == | ||
* [[ProtoFlux:Is Digit]] | |||
* [https://learn.microsoft.com/en-us/dotnet/api/system.char.isnumber#system-char-isnumber(system-char) Microsoft documentation for the <code>Char.IsNumber(Char)</code> function]. | |||
[[Category:ProtoFlux:Strings:Characters]] | [[Category:ProtoFlux:Strings:Characters]] |
Latest revision as of 17:00, 30 June 2024
Is Number
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. Numbers recognized by this node are given the Unicode delegation Nd
, Nl
, or No
.
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.