mirror of
https://github.com/chylex/Minecraft-Phantom-Panel.git
synced 2025-08-20 13:49:51 +02:00
.config
.run
.workdir
Agent
Common
Docker
Server
Phantom.Server
Phantom.Server.Database
Phantom.Server.Database.Postgres
Phantom.Server.Minecraft
Phantom.Server.Rpc
Phantom.Server.Services
Phantom.Server.Web
Base
Layout
Pages
Shared
Utils
EnumNameConverter.cs
wwwroot
App.razor
Configuration.cs
Launcher.cs
Phantom.Server.Web.csproj
_Imports.razor
appsettings.json
Phantom.Server.Web.Bootstrap
Phantom.Server.Web.Components
Phantom.Server.Web.Identity
Utils
.dockerignore
.gitattributes
.gitignore
AddMigration.bat
AddMigration.sh
Directory.Build.props
Directory.Build.targets
Dockerfile
LICENSE
Packages.props
PhantomPanel.sln
README.md
global.json
13 lines
438 B
C#
13 lines
438 B
C#
using System.Text.RegularExpressions;
|
|
|
|
namespace Phantom.Server.Web.Utils;
|
|
|
|
static partial class EnumNameConverter {
|
|
[GeneratedRegex(@"\B([A-Z])", RegexOptions.NonBacktracking)]
|
|
private static partial Regex FindCapitalLettersRegex();
|
|
|
|
public static string ToNiceString<T>(this T type) where T : Enum {
|
|
return FindCapitalLettersRegex().Replace(type.ToString(), static match => " " + match.Groups[1].Value.ToLowerInvariant());
|
|
}
|
|
}
|