Catel.StringExtensions.SplitCamelCase C# (CSharp) Метод

SplitCamelCase() публичный статический Метод

Splits the string by camel case, e.g. 'HiThere' will result in 'Hi there'.
public static SplitCamelCase ( this value ) : string
value this The value.
Результат string
        public static string SplitCamelCase(this string value)
        {
            if (string.IsNullOrWhiteSpace(value))
            {
                return value;
            }

            var finalString = string.Empty;

            for (int i = 0; i < value.Length; i++)
            {
                if (i != 0)
                {
                    if (char.IsUpper(value[i]))
                    {
                        finalString += " " + char.ToLower(value[i]);
                        continue;
                    }
                }

                finalString += value[i];
            }

            return finalString;
        }