Candor.StringExtensions.CamelCaseToPhrase C# (CSharp) Method

CamelCaseToPhrase() public static method

Puts spaces in a camel cased string before each capital letter and makes the capital letters lower case.
public static CamelCaseToPhrase ( this text ) : string
text this
return string
        public static string CamelCaseToPhrase(this string text)
        {
            if (string.IsNullOrEmpty(text))
                return String.Empty;
            var newText = new StringBuilder(text.Length * 2);
            newText.Append(text[0]);
            for (int i = 1; i < text.Length; i++)
            {
                if (char.IsUpper(text[i]))
                    newText.Append(' ');
                newText.Append(text[i]);
            }
            return newText.ToString();
        }