using System.Text.RegularExpressions; using PowderCoating.Core.Enums; namespace PowderCoating.Web.Helpers; public static class AccountingDisplayHelpers { // Splits at lowercase→uppercase boundaries: "AccountsReceivable" → "Accounts Receivable" private static readonly Regex _camelSplit = new(@"(?<=[a-z])(?=[A-Z])", RegexOptions.Compiled); public static string ToDisplayName(this AccountSubType subType) => _camelSplit.Replace(subType.ToString(), " "); public static string ToDisplayName(this AccountType accountType) => _camelSplit.Replace(accountType.ToString(), " "); }