mirror of
https://github.com/duplicati/duplicati.git
synced 2026-05-09 16:49:35 -04:00
16 lines
514 B
C#
16 lines
514 B
C#
namespace Duplicati.Library.Backend.AliyunOSS
|
|
{
|
|
public static class Extensions
|
|
{
|
|
/// <summary>
|
|
/// 移除路径首尾 ' ', '/', '\'
|
|
/// Removes leading and trailing ' ', '/', and '\' from a path.
|
|
/// </summary>
|
|
/// <param name="path">The path to trim.</param>
|
|
/// <returns>The trimmed path.</returns>
|
|
public static string TrimPath(this string path)
|
|
{
|
|
return path?.Trim().Trim('/').Trim('\\').Trim('/').Trim();
|
|
}
|
|
}
|
|
} |