describe
This function describes the string or value provided and returns one of the following results:
identified description | Explanation |
---|---|
integer | Contains a simple integer, positive or negative. |
numeric | Contains a number with digits specified behind, even if they are zero |
scientific | Contains a number with scientific notation |
character | Contains one non-numeric and visible character (excluding white space characters. See 'white' below, but non-breaking spaces (UNICODE 160 / U+00AF0) are not) |
word | Contains visible character containing letters, but no space in-between. |
line | One line containing multiple words |
paragraph | Contains multiple lines (at least 1 new line symbol inside, but not before or after the contents) |
date | Contains a date, comprising of day, month and year in an unambiguous format. Birthday dates without years are not considered as dates. |
time | Contains a time in an unambiguous format, at least hour and minute, optionally second |
date time | Contains both full date and time as specified above |
blank | Empty contents (zero characters) |
white | Contains white spaces only (e.g. space, tabs, new lines) |
For all cases listed above, except for 'blank' and 'white', white spaces before the beginning of the contents
and after the end of the contents will be ignored, including new line.
This function creates a string containing random upper-case characters from A..Z and digits 0..9.
The function random letters generates strings with upper-case characters from A..Z only.
Indirect parameter passing is disabled
1
No. | Type | Description |
---|---|---|
1 input |
string | Contents Contents to be described |
Type | Description |
---|---|
string | Identified description |
strings[] = { "", " ", "13", " 12.1", "1E+3", " C", "Hello", "Hello World", "Hello" + new line + "World",
"20. April 2021 13:15", "2021-04-20", "13:15:00" };
for all parameters( strings[], string[] ) echo( string[], " --> ", describe(string[]), new line);
--> blank
--> white
13 --> integer
12.1 --> numeric
1E+3 --> scientific
C --> character
Hello --> word
Hello World --> line
Hello
World --> paragraph
20. April 2021 13:15 --> date time
2021-04-20 --> date
13:15:00 --> time
table describe
date inside
is numeric
is integer
date inside
time inside