ProtoFlux:Is Digit: Difference between revisions

From Resonite Wiki
→‎* (bool): raaah consistency
m →‎* (bool): this wiki editor doesn't proofread their 2 word changes and somehow messes it up
Line 22: Line 22:


=== * ([[Type:bool|bool]]) ===
=== * ([[Type:bool|bool]]) ===
Returns <code>true</code> if <code>Character</code> is a digit, false otherwise. Digits recognized by this node are given [https://www.compart.com/en/unicode/category/Nd The delegation <code>Nd</code> in Unicode]
Returns <code>true</code> if <code>Character</code> is a digit, <code>false</code> otherwise. Digits recognized by this node are given [https://www.compart.com/en/unicode/category/Nd the delegation <code>Nd</code> in Unicode]


== Examples ==
== Examples ==

Revision as of 20:17, 28 April 2024

Is Digit
Character
*
Characters

The Is Digit node takes in a character literal and returns if that character is a digit. Digit characters are numbers that have a numeric value to them and is not a symbol.

Inputs

Character (char)

The character literal to check.

Outputs

* (bool)

Returns true if Character is a digit, false otherwise. Digits recognized by this node are given the delegation Nd in Unicode

Examples

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

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

See Also