Project

General

Profile

$isnumber » History » Version 4

Per Amundsen, 05/09/2022 07:35 PM

1 1 Per Amundsen
_Added in 4.2_
2
3
*$isnumber(text [, cdens])*
4
5
Returns [[$true]] if the text is a number, otherwise [[$false]].
6
7 4 Per Amundsen
_Same as [[$isnum]]._
8
9 1 Per Amundsen
*Parameters*
10
11 2 Per Amundsen
c - Enables 's' and 'd', partial TODO
12
d - Allows decimal numbers.
13 3 Per Amundsen
e - Allows scientific (exponential) notations.
14 2 Per Amundsen
n - Allows regular numbers.
15
s - Allows leading + and minus signs.
16 1 Per Amundsen
17
*Example*
18
19
<pre>
20
; Returns $false
21
//echo -ag $isnumber(abc)
22
23
; Returns $true
24
//echo -ag $isnumber(555)
25
</pre>