Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ TrimEndingDirectorySeparator() [1/3]

static ReadOnlySpan< char > System.IO.PathInternal.TrimEndingDirectorySeparator ( ReadOnlySpan< char > path)
inlinestaticpackage

Definition at line 227 of file PathInternal.cs.

228 {
229 if (!EndsInDirectorySeparator(path) || IsRoot(path))
230 {
231 return path;
232 }
233 return path.Slice(0, path.Length - 1);
234 }
static bool EndsInDirectorySeparator(string path)
static bool IsRoot(ReadOnlySpan< char > path)
ReadOnlySpan< T > Slice(int start)

References System.IO.PathInternal.EndsInDirectorySeparator(), System.IO.PathInternal.IsRoot(), System.ReadOnlySpan< T >.Length, and System.ReadOnlySpan< T >.Slice().