mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-14 16:51:28 +00:00
Update YooAsset 2.3.8 -> 2.3.12
This commit is contained in:
@@ -34,6 +34,20 @@ namespace YooAsset
|
||||
return str.Remove(index); //"assets/config/test.unity3d" --> "assets/config/test"
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// URL地址是否包含双斜杠
|
||||
/// 注意:只检查协议之后的部分
|
||||
/// </summary>
|
||||
public static bool HasDoubleSlashes(string url)
|
||||
{
|
||||
if (url == null)
|
||||
throw new ArgumentNullException();
|
||||
|
||||
int protocolIndex = url.IndexOf("://");
|
||||
string partToCheck = protocolIndex == -1 ? url : url.Substring(protocolIndex + 3);
|
||||
return partToCheck.Contains("//") || partToCheck.Contains(@"\\");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 合并路径
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user