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

Method write

src/fl/stl/basic_string.h:209–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207 // Generic write for multi-byte integer types
208 template <typename T>
209 typename fl::enable_if<fl::is_multi_byte_integer<T>::value, fl::size>::type
210 write(const T& val) FL_NOEXCEPT {
211 using target_t = typename int_cast_detail::cast_target<T>::type;
212 char buf[64] = {0};
213 int len;
214 if (fl::is_signed<target_t>::value) {
215 len = fl::itoa(static_cast<fl::i32>(val), buf, 10);
216 } else {
217 len = fl::utoa32(static_cast<fl::u32>(val), buf, 10);
218 }
219 return write(buf, len);
220 }
221
222 // ======= COPY OPERATIONS =======
223 void copy(const char* str) FL_NOEXCEPT;

Callers

nothing calls this directly

Calls 2

itoaFunction · 0.85
utoa32Function · 0.85

Tested by

no test coverage detected