| Index: compiled/String.h |
| =================================================================== |
| --- a/compiled/String.h |
| +++ b/compiled/String.h |
| @@ -186,16 +186,33 @@ |
| if (currChar >= u'A' && currChar <= u'Z') |
| mBuf[i] = currChar + u'a' - u'A'; |
| else if (currChar >= 128) |
| { |
| mBuf[i] = CharToLower(currChar); |
| } |
| } |
| } |
| + |
| + int toInt() const |
| + { |
|
hub
2017/11/27 17:15:44
This is redundant with some of the changes in http
|
| + size_type count = 0; |
| + int value = 0; |
| + for (size_type i = 0; i < length(); i++) |
| + { |
| + if (mBuf[i] < u'0' || mBuf[i] > u'9') |
| + return 0; |
| + value *= 10; |
| + value += mBuf[i] - u'0'; |
| + count++; |
| + if (count > 8) |
| + return 0; |
| + } |
| + return value; |
| + } |
| }; |
| class DependentString : public String |
| { |
| public: |
| explicit DependentString() |
| : String(nullptr, 0, INVALID) |
| { |