From 5856a6e5de198436bc112923609db21c9a45fd10 Mon Sep 17 00:00:00 2001
From: username@email.com <yzy2002yzy@163.com>
Date: 星期二, 01 七月 2025 15:58:42 +0800
Subject: [PATCH] 增加公司收藏工人的功能
---
cylsg/cylsg.utility/Extend/StringEx.cs | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/cylsg/cylsg.utility/Extend/StringEx.cs b/cylsg/cylsg.utility/Extend/StringEx.cs
index d6e261a..095dbcc 100644
--- a/cylsg/cylsg.utility/Extend/StringEx.cs
+++ b/cylsg/cylsg.utility/Extend/StringEx.cs
@@ -232,5 +232,20 @@
}
#endregion
+ /// <summary>
+ /// 棣栧瓧姣嶈浆澶у啓
+ /// </summary>
+ /// <param name="input"></param>
+ /// <returns></returns>
+ public static string FirstToCapitalize(this string input)
+ {
+ if (string.IsNullOrEmpty(input))
+ {
+ return input;
+ }
+
+ TextInfo textInfo = new CultureInfo("en-US", false).TextInfo;
+ return textInfo.ToTitleCase(input.ToLower()).Substring(0, 1) + input.Substring(1);
+ }
}
}
--
Gitblit v1.9.1