You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CryoEagle edited this page Dec 26, 2018
·
4 revisions
string_digits
Returns a copy of a given string with everything but its digits removed.
Syntax:
string_digits(str)
Argument
Description
string str
The string to get the digits from.
Returns:string
Description
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".
Example:
stringstr1="We have 64 eggs";stringstr2=string_digits(str1);integgs=real(str2);
The above code will take the str1, strip it of all characters other than numbers and then set the variable "eggs" to hold the real number value of the return string.