last ...
This commit is contained in:
@@ -52,5 +52,26 @@ namespace xApi.Extensions
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Normalize a URL Segment ...
|
||||
/// </summary>
|
||||
/// <param name="segment"></param>
|
||||
/// <returns></returns>
|
||||
public static string NormalizeUrlSegent(
|
||||
this string segment
|
||||
)
|
||||
{
|
||||
//
|
||||
if (!string.IsNullOrWhiteSpace(segment) &&
|
||||
segment.StartsWith("/")
|
||||
)
|
||||
{
|
||||
segment = segment[1..];
|
||||
}
|
||||
|
||||
//
|
||||
return segment;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user