MCPcopy Create free account
hub / github.com/SmingHub/Sming / printTo

Method printTo

Sming/Core/Data/BitSet.h:374–392  ·  view source on GitHub ↗

* @brief Class template to print the contents of a BitSet to a String * @note Requires an implementation of `toString(E)` */

Source from the content-addressed store, hash-verified

372 * @note Requires an implementation of `toString(E)`
373 */
374 size_t printTo(Print& p, const String& separator = ", ") const
375 {
376 extern String toString(E e);
377
378 size_t n{0};
379
380 for(unsigned i = 0; i < size(); ++i) {
381 auto e = E(i);
382 if(!test(e)) {
383 continue;
384 }
385 if(n != 0) {
386 n += p.print(separator);
387 }
388 n += p.print(e);
389 }
390
391 return n;
392 }
393
394private:
395 void IfHelper() const

Callers 2

onDownloadFunction · 0.45
onReceiveFunction · 0.45

Calls 3

EFunction · 0.85
testFunction · 0.85
printMethod · 0.45

Tested by

no test coverage detected