mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Add ToUnderLineNew
This commit is contained in:
parent
7959a2e00a
commit
aac4f96325
@ -17,6 +17,13 @@ namespace SqlSugar
|
||||
{
|
||||
public class UtilMethods
|
||||
{
|
||||
public static string ToUnderLineNew(string str)
|
||||
{
|
||||
if(!str.Contains("_"))
|
||||
return string.Concat(str.Select((x, i) => i > 0 && char.IsUpper(x) ? "_" + x.ToString() : x.ToString()));
|
||||
else
|
||||
return str;
|
||||
}
|
||||
public static string ToUnderLine(string str, bool isToUpper = false)
|
||||
{
|
||||
if (isToUpper)
|
||||
|
Loading…
Reference in New Issue
Block a user