FastLED 3.10.6
Loading...
Searching...
No Matches

◆ is_parent_at()

bool fl::asset_detail::is_parent_at ( const char * p,
fl::size i )
constexpr

Compile-time check: does position i in p start a ".." segment?

A ".." segment is two consecutive dots at a segment boundary — i.e. the preceding character is ‘’/','\', or the string start, and the following character is'/','\'`, or the string end.

Definition at line 52 of file asset.h.

52 {
53 // Segment start: either we're at the beginning, or preceded by a separator.
54 return (i == 0 || p[i - 1] == '/' || p[i - 1] == '\\')
55 && p[i] == '.' && p[i + 1] == '.'
56 && (p[i + 2] == '\0' || p[i + 2] == '/' || p[i + 2] == '\\');
57}

References fl::FL_NO_EXCEPT.

Referenced by path_has_parent_segment_at().

+ Here is the caller graph for this function: