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

◆ HasExtension() [2/2]

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

Definition at line 287 of file Path.cs.

288 {
289 for (int num = path.Length - 1; num >= 0; num--)
290 {
291 char c = path[num];
292 if (c == '.')
293 {
294 return num != path.Length - 1;
295 }
296 if (PathInternal.IsDirectorySeparator(c))
297 {
298 break;
299 }
300 }
301 return false;
302 }

References System.IO.PathInternal.IsDirectorySeparator(), and System.ReadOnlySpan< T >.Length.