omega-rosetta
aien-dev/omega-rosetta
Brought by drakestapleton
omega-rosetta / bench / solutions / HumanEval_27.om
| 1 | n = long 0 |
| 2 | for i ulong len string |
| 3 | c = get string i |
| 4 | if and ge c 97 le c 122 |
| 5 | c = sub c 32 |
| 6 | else |
| 7 | if and ge c 65 le c 90 |
| 8 | c = add c 32 |
| 9 | end |
| 10 | end |
| 11 | put res i c |
| 12 | n = add n 1 |
| 13 | end |
| 14 | ret n |
| 15 | end |