Prefix any string with ^
to make it case insensitive.
Comparison with other strings will use Swift's localizedCaseInsensitiveCompare
function under the hood:
let fileExtension = "JPG"
let message: String
switch ^fileExtension {
case "jpg":
message = "It's a jpg!"
default:
message = "It's not a jpg!"
}