I would like to take a pascal-cased string like ‘CountOfWidgets’ and convert it into something more user-friendly like ‘Count of Widgets’ in C#. Multiple adjacent uppercase characters should be left intact. What is the most efficient way to do this?
NOTE: Duplicate of .NET – How can you split a "caps" delimited string into an array?
Don’t know about efficient but at least it’s terse: