mirror of
https://github.com/AssetRipper/AssetRipper.git
synced 2025-12-11 20:15:29 +01:00
16 lines
366 B
C#
16 lines
366 B
C#
namespace AssetRipper.Assets;
|
|
|
|
internal static class StringPathExtensions
|
|
{
|
|
[return: NotNullIfNotNull(nameof(str))]
|
|
public static string? RemovePeriod(this string? str)
|
|
{
|
|
return string.IsNullOrEmpty(str) || str[0] != '.' ? str : str.Substring(1);
|
|
}
|
|
|
|
public static string? NotEmpty(this string? str)
|
|
{
|
|
return string.IsNullOrEmpty(str) ? null : str;
|
|
}
|
|
}
|