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

Function writeView

src/fl/wdt/watchdog.cpp.hpp:49–53  ·  view source on GitHub ↗

Copy a string_view into out[]. Returns bytes copied, truncated to out.size().

Source from the content-addressed store, hash-verified

47
48// Copy a string_view into out[]. Returns bytes copied, truncated to out.size().
49inline fl::size writeView(fl::span<char> out, fl::string_view sv) FL_NOEXCEPT {
50 fl::size n = (out.size() < sv.size()) ? out.size() : sv.size();
51 for (fl::size i = 0; i < n; ++i) out[i] = sv[i];
52 return n;
53}
54
55inline fl::size writeChar(fl::span<char> out, char c) FL_NOEXCEPT {
56 if (out.size() == 0) return 0;

Callers 1

describeMethod · 0.85

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected