| Index: compiled/String.h |
| =================================================================== |
| --- a/compiled/String.h |
| +++ b/compiled/String.h |
| @@ -186,16 +186,34 @@ |
| if (currChar >= u'A' && currChar <= u'Z') |
| mBuf[i] = currChar + u'a' - u'A'; |
| else if (currChar >= 128) |
| { |
| mBuf[i] = CharToLower(currChar); |
| } |
| } |
| } |
| + |
| + void toUpper() |
|
hub
2017/10/25 01:19:38
I now realize I don't need this one. Will remove i
|
| + { |
| + size_type len = length(); |
| + for (size_type i = 0; i < len; ++i) |
| + { |
| + value_type currChar = mBuf[i]; |
| + |
| + // This should be more efficient with a lookup table but I couldn't measure |
| + // any performance difference. |
| + if (currChar >= u'a' && currChar <= u'z') |
| + mBuf[i] = currChar - (u'a' - u'A'); |
| + else if (currChar >= 128) |
| + { |
| + mBuf[i] = CharToUpper(currChar); |
| + } |
| + } |
| + } |
| }; |
| class DependentString : public String |
| { |
| public: |
| explicit DependentString() |
| : String(nullptr, 0, INVALID) |
| { |