Is there a command in Vim that changes the case of the selected text?
Visually select the text, then U for uppercase or u for lowercase. To swap all casing in a visual selection, press ~ (tilde).
Without using a visual selection, gU<motion> will make the characters in motion uppercase, or use gu<motion> for lowercase.
For more of these, see section 3 in Vim's change.txt help file.