Is there a fast way to get a number out of a text input?
Like getting '1.5' out of 'sdaz1.5;['.
Here's what I have at the moment:
string processValue(string s) {
string ns;
foreach(c; s) {
if (c >= '0' && c <= '9')
ns ~= c;
else if (c == '.')
ns ~= '.';
}
return ns;
}