模型通用接口List改为用left join

This commit is contained in:
2023-11-09 10:21:31 +08:00
parent 14aa0b2ff4
commit cacf974527
4 changed files with 44 additions and 32 deletions

View File

@@ -184,7 +184,10 @@ public static class StringExtensions
#endregion
public static (string, string) LastSplit(this string str, char seperate)
/// <summary>
/// 查找路径的上一级
/// </summary>
public static (string?, string) LastSplitOnce(this string str, char seperate)
{
int n = str.LastIndexOf(seperate);
if (n > 0)
@@ -193,7 +196,8 @@ public static class StringExtensions
}
else
{
return (str, null);
return (null, str);
}
}
}