From 801e83de3caae9a44c50c7fd627728dd3a95ec75 Mon Sep 17 00:00:00 2001
From: wupengfei <834520024@qq.com>
Date: 星期五, 08 八月 2025 15:12:53 +0800
Subject: [PATCH] feat: 任务

---
 src/utils/common/common.ts |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/utils/common/common.ts b/src/utils/common/common.ts
index b05dfc3..374c3a8 100644
--- a/src/utils/common/common.ts
+++ b/src/utils/common/common.ts
@@ -106,3 +106,12 @@
 export function filterNumbersFromString(str: string) {
   return str.replace(/\D/g, '');
 }
+
+export function formatRoleName(roleName: string) {
+  let lastUnderscoreIndex = roleName.lastIndexOf('_');
+
+  if (lastUnderscoreIndex !== -1) {
+    roleName = roleName.substring(0, lastUnderscoreIndex);
+  }
+  return roleName;
+}

--
Gitblit v1.9.1