RosettaCodeData/Task/String-comparison/Jq/string-comparison-2.jq
2017-09-25 22:28:19 +02:00

7 lines
256 B
Text

# Only characters A to Z are affected
def downcase:
explode | map( if 65 <= . and . <= 90 then . + 32 else . end) | implode;
# Only characters a to z are affected
def upcase:
explode | map( if 97 <= . and . <= 122 then . - 32 else . end) | implode;