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

◆ GetFileName() [1/2]

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

Definition at line 214 of file Path.cs.

215 {
216 int length = GetPathRoot(path).Length;
217 int num = path.Length;
218 while (--num >= 0)
219 {
220 if (num < length || PathInternal.IsDirectorySeparator(path[num]))
221 {
222 return path.Slice(num + 1, path.Length - num - 1);
223 }
224 }
225 return path;
226 }
static ? string GetPathRoot(string? path)
Definition Path.cs:1008
ReadOnlySpan< T > Slice(int start)

References System.IO.Path.GetPathRoot(), System.IO.PathInternal.IsDirectorySeparator(), System.length, System.ReadOnlySpan< T >.Length, and System.ReadOnlySpan< T >.Slice().