November 12, 2005 BUG: isNumric() | ||||
---|---|---|---|---|
| ||||
I have found that isNumeric() accepts "+", but toInt() chokes on it. I guess whatever isNumeric() says is ok should be safe to pass on to isInt() and isFloat(). Here is a quick diff to std/string.d (0.137) that solves this problem, I have not done any further analyzis of compatibility of isNumeric() and toInt() and toFloat(). 3136c3136,3140 < j++; --- > { > j++; > if (j == iLen) > return false; > } //Fredrik Olsson |
Copyright © 1999-2021 by the D Language Foundation