This is an old revision of the document!
strval
Find the numeric value of a string.
Description
strval( const string[], index=0 )
strval will evaluate all digits starting at the index position until it encounters a non-digit.
Parameters
string | The buffer to be evaluated |
index | The offset in the buffer to start looking for a number. |
Return value
The value in the string.
Returns 0 if the string starting at the index did not start with a valid number.
Example usage
new x; new s{20} = "Cat47"; x = strval(s, 3); // x is now 47