We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent baa3647 commit a667ec5Copy full SHA for a667ec5
string.gs
@@ -74,7 +74,8 @@ func uppercase(text) {
74
local i = 1;
75
repeat length($text) {
76
local j = 1;
77
- until $text[i] == ASCII_UPPERCASE[j] or j > 26 {
+ # This also detects for empty string, which happens when j is out of range of ASCII_UPPERCASE, i.e j > 26
78
+ until ASCII_UPPERCASE[j] in $text[i] {
79
j++;
80
}
81
if j > 26 {
test/main.gs
@@ -4,5 +4,5 @@ costumes "blank.svg";
4
%include inflator/string
5
6
onflag {
7
- # assert_eq
+ assert_eq uppercase("test..?"), "TEST..?", "uppercase";
8
0 commit comments