1
0
mirror of https://github.com/chylex/Code-Statistics.git synced 2024-11-25 06:42:45 +01:00
Code-Statistics/CodeStatisticsCore/Handling/Utils/StringUtils.cs

11 lines
441 B
C#

namespace CodeStatisticsCore.Handling.Utils{
public static class StringUtils{
/// <summary>
/// Capitalizes the first character of a string and leaves the rest intact.
/// </summary>
public static string CapitalizeFirst(this string me){
return me.Length == 0 ? string.Empty : me.Length == 1 ? me.ToUpperInvariant() : me.Substring(0, 1).ToUpperInvariant()+me.Substring(1);
}
}
}