strtolower() in Bash: Convert a String to Lowercase
A strtolower() for Bash 4 and the stock macOS Bash 3.2, why ${var,,} depends on your locale, and when declare -l, tr, awk or nocasematch fit better.
Topic
A strtolower() for Bash 4 and the stock macOS Bash 3.2, why ${var,,} depends on your locale, and when declare -l, tr, awk or nocasematch fit better.
A strtoupper() that works on Bash 4+ and macOS's Bash 3.2, plus ${var^^pattern} for uppercasing only some characters and declare -u for variables.
Check whether a string contains a substring regardless of case, with a Bash 4 version, a Bash 3.2 fallback using nocasematch, and a PHP-style stristr().
A ucfirst() for Bash 4+ and macOS's Bash 3.2, what "first character" really means, and how to get "Hello" from "hELLO" or " hello".
A ucwords() for Bash that works word by word instead of char by char, preserves all whitespace, and lets you decide what counts as a word boundary.
lcfirst() in Bash with ${var,} and a Bash 3.2 fallback, used for PascalCase to camelCase, plus a fix for names that begin with an acronym.