Migrating Code
This commit is contained in:
parent
1fbc49884c
commit
cbbe897d15
9 changed files with 674 additions and 0 deletions
26
CapyKit/Helpers/LanguageHelper.cs
Normal file
26
CapyKit/Helpers/LanguageHelper.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace CapyKit.Helpers
|
||||
{
|
||||
public class LanguageHelper
|
||||
{
|
||||
#region Methods
|
||||
|
||||
/// <summary> Converts camel case text to human readable text. </summary>
|
||||
/// <param name="value"> The value. </param>
|
||||
/// <returns> A string in human readable format. </returns>
|
||||
public static string CamelCaseToHumanReadable(string value)
|
||||
{
|
||||
var regex = new Regex(@"(?<=[A-Z])(?=[A-Z][a-z]) | (?<=[^A-Z])(?=[A-Z]) | (?<=[A-Za-z])(?=[^A-Za-z])", RegexOptions.IgnorePatternWhitespace);
|
||||
|
||||
return regex.Replace(value, " ");
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue