Transform upper or lower string