2025-08-19 04:33:02 +04:00
|
|
|
namespace Telegrator.RoslynGenerators.RoslynExtensions
|
2025-08-16 13:13:34 +04:00
|
|
|
{
|
|
|
|
|
public static class StringExtensions
|
|
|
|
|
{
|
|
|
|
|
public static string FirstLetterToUpper(this string target)
|
|
|
|
|
{
|
|
|
|
|
char[] chars = target.ToCharArray();
|
|
|
|
|
int index = chars.IndexOf(char.IsLetter);
|
|
|
|
|
chars[index] = char.ToUpper(chars[index]);
|
|
|
|
|
return new string(chars);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static string FirstLetterToLower(this string target)
|
|
|
|
|
{
|
|
|
|
|
char[] chars = target.ToCharArray();
|
|
|
|
|
int index = chars.IndexOf(char.IsLetter);
|
|
|
|
|
chars[index] = char.ToLower(chars[index]);
|
|
|
|
|
return new string(chars);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|