Leaf Input Parsing complete
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user