17 lines
421 B
C#
17 lines
421 B
C#
namespace MycroForge.CLI.Extensions;
|
|
|
|
public static class StringExtensions
|
|
{
|
|
public static string[] FullyQualifiedName(this string name)
|
|
{
|
|
return name.Split(':').Select(s => s.Trim()).ToArray();
|
|
}
|
|
|
|
public static string DeduplicateDots(this string path)
|
|
{
|
|
while (path.Contains(".."))
|
|
path = path.Replace("..", ".");
|
|
|
|
return path.Trim('.');
|
|
}
|
|
} |