FastLED 3.9.15
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 50 of file asset.h.

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

References FL_NOEXCEPT.

Referenced by path_has_parent_segment_at().

+ Here is the caller graph for this function: