Rewritten string case manipulation to use std::transform.