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

◆ GetPathRoot() [1/2]

static ReadOnlySpan< char > System.IO.Path.GetPathRoot ( ReadOnlySpan< char > path)
inlinestatic

Definition at line 1022 of file Path.cs.

1023 {
1024 if (PathInternal.IsEffectivelyEmpty(path))
1025 {
1026 return ReadOnlySpan<char>.Empty;
1027 }
1028 int rootLength = PathInternal.GetRootLength(path);
1029 if (rootLength > 0)
1030 {
1031 return path.Slice(0, rootLength);
1032 }
1033 return ReadOnlySpan<char>.Empty;
1034 }
ReadOnlySpan< T > Slice(int start)

References System.ReadOnlySpan< T >.Empty, System.IO.PathInternal.GetRootLength(), System.IO.PathInternal.IsEffectivelyEmpty(), and System.ReadOnlySpan< T >.Slice().