Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
25
Task/String-case/EasyLang/string-case.easy
Normal file
25
Task/String-case/EasyLang/string-case.easy
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
proc toUppercase string$ . result$ .
|
||||
for i = 1 to len string$
|
||||
code = strcode substr string$ i 1
|
||||
if code >= 97 and code <= 122
|
||||
code -= 32
|
||||
.
|
||||
result$ &= strchar code
|
||||
.
|
||||
.
|
||||
proc toLowercase string$ . result$ .
|
||||
for i = 1 to len string$
|
||||
code = strcode substr string$ i 1
|
||||
if code >= 65 and code <= 90
|
||||
code += 32
|
||||
.
|
||||
result$ &= strchar code
|
||||
.
|
||||
.
|
||||
string$ = "alphaBETA"
|
||||
print string$
|
||||
call toUppercase string$ result$
|
||||
print result$
|
||||
result$ = ""
|
||||
call toLowercase string$ result$
|
||||
print result$
|
||||
Loading…
Add table
Add a link
Reference in a new issue