调整进入getKeyData的判断条件
This commit is contained in:
@@ -824,6 +824,22 @@ public static class StringExtensions
|
||||
|
||||
return char.ToUpper(str[0]) + str.Substring(1, str.Length - 1);
|
||||
}
|
||||
/// <summary>
|
||||
/// Span实现首字符大写
|
||||
/// added by ly on 20230407
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public static string FirstCharToUpperAsSpan(this string input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input))
|
||||
{
|
||||
return string.Empty;
|
||||
}
|
||||
Span<char> destination = stackalloc char[1];
|
||||
input.AsSpan(0, 1).ToUpperInvariant(destination);
|
||||
return $"{destination}{input.AsSpan(1)}";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 计算当前字符串与指定字符串的编辑距离(相似度).
|
||||
|
||||
Reference in New Issue
Block a user