Files
LeafWeb/Core/Utility/StringExtensions.cs
T
2015-11-20 11:39:23 -05:00

18 lines
379 B
C#

using System;
using System.Globalization;
using System.Linq;
namespace LeafWeb.Core.Utility
{
public static class StringExtensions
{
public static string SplitCamelCase(this string str)
{
return str.Aggregate(
String.Empty,
(current, c) =>
current + (Char.IsUpper(c) && current.Length > 0 ? " " + c : c.ToString(CultureInfo.InvariantCulture)));
}
}
}