Lower, upper and swapcase impl for strings