Refactor CapyKit utilities: streamline namespaces, improve code consistency, and enhance XML documentation.

This commit is contained in:
Jordan Wages 2026-07-23 19:53:33 -05:00
commit f03f73afc7
28 changed files with 5180 additions and 4298 deletions

View file

@ -1,33 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Text.RegularExpressions;
namespace CapyKit.Helpers
namespace CapyKit.Helpers;
/// <summary>
/// Helper class for handling text transformations.
/// </summary>
public class LanguageHelper
{
/// <summary>
/// Helper class for handling text transformations.
/// </summary>
public class LanguageHelper
#region Methods
/// <summary> Converts camel case text to human readable text. </summary>
/// <remarks>
/// Camel case is a naming convention for identifiers in which the first letter of each word is
/// capitalized.
/// </remarks>
/// <param name="value"> The value. </param>
/// <returns> A string in human readable format. </returns>
public static string CamelCaseToHumanReadable(string value)
{
#region Methods
var regex = new Regex(@"(?<=[A-Z])(?=[A-Z][a-z]) | (?<=[^A-Z])(?=[A-Z]) | (?<=[A-Za-z])(?=[^A-Za-z])",
RegexOptions.IgnorePatternWhitespace);
/// <summary> Converts camel case text to human readable text. </summary>
/// <remarks>
/// Camel case is a naming convention for identifiers in which the first letter of each word is
/// capitalized.
/// </remarks>
/// <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
return regex.Replace(value, " ");
}
}
#endregion
}