Function to extract a single character from a string variable.
The corresponding ascii code is returned as an integer value.
Syntax |
i32 str_asc (string str, i32 nPos) |
---|---|
str |
Locates the string of interest |
nPos |
Locates the position of the character within the string |
Result |
Returns the ascii code corresponding to the extrapolated character. If nPos points to a character outside the string (or the string is empty), the returned value will be 0 |
Validity |
Rule, Task |
Note |
Example of use:
|