DEV Community

Discussion on: Daily Challenge #270 - Fix String Case

Collapse
 
peledzohar profile image
Zohar Peled

Is it really a challenge?

string solve(string input)
{
    return input.Count(c => char.IsUpper(c)) > input.Length / 2 
        ? input.ToUpper()
        : input.ToLower();
}