Skip to content

Commit 7a0fa62

Browse files
committed
fix(extensions): 修复 ConvertToUnderLine 方法缺少 this 关键字
该方法应该是一个扩展方法,但缺少 this 关键字导致无法作为扩展方法调用。
1 parent 5ea0591 commit 7a0fa62

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

GameFrameX.Foundation.Extensions/StringExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public static int GetDisplayWidth(this string text)
150150
/// 例如:"HelloWorld"转换为"hello_world","IsValid"转换为"is_valid"。
151151
/// 当字符串中已包含下划线时,直接返回原字符串。
152152
/// </remarks>
153-
public static string ConvertToUnderLine(string str, bool isToUpper = false)
153+
public static string ConvertToUnderLine(this string str, bool isToUpper = false)
154154
{
155155
ArgumentNullException.ThrowIfNull(str, nameof(str));
156156
if (str.Contains('_'))

0 commit comments

Comments
 (0)