File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1407,8 +1407,8 @@ class Interpreter {
1407
1407
const auto *str = static_cast <const HeapString *>(args[0 ].v .h );
1408
1408
UString new_str (str->value );
1409
1409
for (int i = 0 ; i < new_str.size (); ++i) {
1410
- if (new_str[i] > 64 && new_str[i] < 91 ) {
1411
- new_str[i] = new_str[i] + 32 ;
1410
+ if (new_str[i] >= ' A ' && new_str[i] <= ' Z ' ) {
1411
+ new_str[i] = new_str[i] - ' A ' + ' a ' ;
1412
1412
}
1413
1413
}
1414
1414
scratch = makeString (new_str);
@@ -1421,8 +1421,8 @@ class Interpreter {
1421
1421
const auto *str = static_cast <const HeapString *>(args[0 ].v .h );
1422
1422
UString new_str (str->value );
1423
1423
for (int i = 0 ; i < new_str.size (); ++i) {
1424
- if (new_str[i] > 96 && new_str[i] < 123 ) {
1425
- new_str[i] = new_str[i] - 32 ;
1424
+ if (new_str[i] >= ' a ' && new_str[i] <= ' z ' ) {
1425
+ new_str[i] = new_str[i] - ' a ' + ' A ' ;
1426
1426
}
1427
1427
}
1428
1428
scratch = makeString (new_str);
You can’t perform that action at this time.
0 commit comments