Skip to content

Commit ab4e016

Browse files
committed
(#18) PathStrings: drop a method that's no longer used
1 parent 2fd0bd4 commit ab4e016

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

TruePath/PathStrings.cs

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -182,34 +182,4 @@ private static bool SourceContainsDriveLetter(ReadOnlySpan<char> source)
182182

183183
return source[1] == VolumeSeparatorChar && (uint)((source[0] | 0x20) - 'a') <= (uint)('z' - 'a');
184184
}
185-
186-
/// <summary>
187-
/// Resolves and normalizes relative paths in the given path string by removing redundant path components.
188-
/// </summary>
189-
/// <param name="source">The path string to process.</param>
190-
/// <returns>
191-
/// The normalized path string. If the source path contains only directory separators or dots, an empty string is returned. Otherwise, the original path is returned.
192-
/// </returns>
193-
/// <remarks>
194-
/// This method iterates over the characters in the input path string and removes those that are directory separators or dots. If the resulting length of the path is zero, indicating that the path only contained separators or dots, it returns an empty string. Otherwise, it returns the original path unchanged.
195-
/// </remarks>
196-
internal static string ResolveRelativePaths(string source)
197-
{
198-
if (string.IsNullOrWhiteSpace(source))
199-
{
200-
return string.Empty;
201-
}
202-
203-
var c = source.Length;
204-
205-
foreach (var @char in source)
206-
{
207-
if (@char == Path.DirectorySeparatorChar || @char == '.')
208-
{
209-
c--;
210-
}
211-
}
212-
213-
return c == 0 ? string.Empty : source;
214-
}
215185
}

0 commit comments

Comments
 (0)