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

Function asSpan

tests/fl/net/http/chunked_encoding.cpp:7–9  ·  view source on GitHub ↗

Helper: wrap a C string as a span for feed()

Source from the content-addressed store, hash-verified

5
6// Helper: wrap a C string as a span for feed()
7static fl::span<const uint8_t> asSpan(const char* s, size_t len) {
8 return fl::span<const uint8_t>(reinterpret_cast<const uint8_t*>(s), len); // ok reinterpret cast
9}
10static fl::span<const uint8_t> asSpan(const char* s) {
11 return asSpan(s, fl::strlen(s));
12}

Callers 1

FL_TEST_FILEFunction · 0.70

Calls 1

strlenFunction · 0.85

Tested by

no test coverage detected