1 Star 0 Fork 1

dotnet爱好者/codeGenerator

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
CommonHelper.cs 1.00 KB
一键复制 编辑 原始数据 按行查看 历史
dotnet爱好者 提交于 2019-10-10 15:21 +08:00 . 代码迁移
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CodeGenerator
{
public static class CommonHelper
{
/// <summary>
/// 首字母小写写
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public static string FirstCharToLower(this string input)
{
if (String.IsNullOrEmpty(input))
return input;
string str = input.First().ToString().ToLower() + input.Substring(1);
return str;
}
/// <summary>
/// 首字母大写
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
public static string FirstCharToUpper(this string input)
{
if (String.IsNullOrEmpty(input))
return input;
string str = input.First().ToString().ToUpper() + input.Substring(1);
return str;
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/dotnetfans/codeGenerator.git
git@gitee.com:dotnetfans/codeGenerator.git
dotnetfans
codeGenerator
codeGenerator
master

搜索帮助