MCPcopy Create free account
hub / github.com/FastLED/FastLED / clen

Function clen

src/fl/asset/asset.h:41–43  ·  view source on GitHub ↗

Compile-time length of a null-terminated C string. Recursive constexpr form — compatible with C++11-only `constexpr` (no loops / locals).

Source from the content-addressed store, hash-verified

39/// Compile-time length of a null-terminated C string. Recursive constexpr
40/// form — compatible with C++11-only `constexpr` (no loops / locals).
41constexpr fl::size clen(const char* s, fl::size n = 0) FL_NOEXCEPT {
42 return s[n] == '\0' ? n : clen(s, n + 1);
43}
44
45/// Compile-time check: does position `i` in `p` start a ".." segment?
46///

Callers 1

assetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected