refactor: Update Unity to 2022.3.62
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Cryville.Common {
|
||||
/// <param name="s">The file name or file path.</param>
|
||||
/// <returns>The file name or file path with the extension removed.</returns>
|
||||
public static string TrimExt(string s) {
|
||||
return s.Substring(0, s.LastIndexOf("."));
|
||||
return s[..s.LastIndexOf(".")];
|
||||
}
|
||||
/// <summary>
|
||||
/// Converts the value of a <see cref="TimeSpan" /> to a human-readable string.
|
||||
@@ -52,12 +52,12 @@ namespace Cryville.Common {
|
||||
public static string GetProcessPathFromCommand(string command) {
|
||||
command = command.Trim();
|
||||
if (command[0] == '"') {
|
||||
return command.Substring(1, command.IndexOf('"', 1) - 1);
|
||||
return command[1..command.IndexOf('"', 1)];
|
||||
}
|
||||
else {
|
||||
int e = command.IndexOf(' ');
|
||||
if (e == -1) return command;
|
||||
else return command.Substring(0, e);
|
||||
else return command[..e];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user