-
-
Notifications
You must be signed in to change notification settings - Fork 19
string_digits
drewmccluskey edited this page Nov 28, 2018
·
4 revisions
Returns a copy of a given string with everything but its digits removed.
string_digits( str );| Argument | Description |
|---|---|
| str | The string to get the digits from. |
Returns: String
You can use this function to parse a given string and get any numbers from it. For example, say you have this text - "I am 81 years old". With this function you would get a return string of "81".
var t_str;
t_str = string_digits(input_str);
age = real(t_str);The above code will take the input string, strip it of all characters other than numbers and then set the variable "age" to hold the real number value of the return string.
Back to strings