diff --git a/src/Humanizer/StringHumanizeExtensions.cs b/src/Humanizer/StringHumanizeExtensions.cs index cf4f24ead..bd0e06c0e 100644 --- a/src/Humanizer/StringHumanizeExtensions.cs +++ b/src/Humanizer/StringHumanizeExtensions.cs @@ -1,4 +1,6 @@ using System.Runtime.InteropServices; +using System.Linq; + namespace Humanizer; @@ -90,10 +92,11 @@ static string FromPascalCase(string input) public static string Humanize(this string input) { // if input is all capitals (e.g. an acronym) then return it without change - if (input.All(char.IsUpper)) - { - return input; - } + if (input.All(char.IsUpper) && + input.Any(c => c == ' ' || c == '_' || c == '-')) + { + input = input.ToLowerInvariant(); + } // if input contains a dash or underscore which precedes or follows a space (or both, e.g. freestanding) // remove the dash/underscore and run it through FromPascalCase