Created
January 8, 2014 20:50
-
-
Save coderofsalvation/8324402 to your computer and use it in GitHub Desktop.
convert a string to lower characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# convert a string to lower characters | |
# @param string input | |
function strtolower() | |
{ | |
[ -z "$1" ] && return 1 | |
printf "%s\\n" "$@" | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' # tr '[:upper:]' '[:lower:]' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment