MCPcopy Create free account
hub / github.com/RobTillaart/Arduino / getNth

Method getNth

libraries/Set/Set.cpp:248–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246
247
248int Set::getNth(const uint8_t n)
249{
250 if (n == 0) return -1;
251 if (n == 1) return first();
252 _current = first();
253 int i = 1;
254 while ((_current > -1) && (i < n))
255 {
256 _current = next();
257 i++;
258 }
259 return _current;
260}
261
262
263int Set::findPrev(const uint8_t p, uint8_t q)

Callers 1

unittestFunction · 0.80

Calls

no outgoing calls

Tested by 1

unittestFunction · 0.64