/// <summary> /// Splits pascal case, so "FooBar" would become "Foo Bar" /// </summary> public static string SplitPascalCase(this string input) { if (string.IsNullOrEmpty(input)) { return input; } return Regex.Replace(input, "([A-Z])", " $1").Trim(); }