Math & Text
parsefloat
$parseFloat — Reads the decimal number at the start of a text, ignoring what follows.
Reads the decimal number at the start of a text, ignoring what follows.
Syntax
$parseFloat[value;(fallback)]
Parameters
- value (text, required) — For example
3.5kg. - fallback (text, optional) — Returned when no number starts the text.
Return Value
- string.
Usage
$parseFloat[3.5kg] → "3.5"
Example
$sendMessage[$parseFloat[3.5kg]]
Try it
Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.