QB_MAP_FOREACH(3)

πŸ’– QB_MAP_FOREACH(3) πŸ’–

okay bestie, welcome to the libqb Programmer's Manual ✨ this one's a lil bop, i promise.


🌸 NAME 🌸

qb_map_foreach β€” literally calls the function you hand it, once for every single key/value pair chillin' in the map. every. last. one. no skips πŸ’…


✨ SYNOPSIS ✨

#include <qb/qbmap.h>

void qb_map_foreach(
    qb_map_t             *map,
    qb_map_transverse_fn  func,
    void                 *user_data
);

like. three args. that's it. we love a low-effort queen πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the vibe: your func gets handed the key and the value of each pair, plus the user_data you passed in (the "given data parameter", if we're being formal about it πŸ’€).

and bestie β€” the map is traversed in sorted order. not random. not chaotic. sorted. the way that it just walks through everything in order is genuinely so satisfying, it's giving organized. it's giving main character energy. periodt 🌈


πŸŽ€ SEE ALSO πŸŽ€

the whole friend group, fr fr β€” go say hi:


Copyright (C) 2010-2020 Red Hat, Inc.


πŸ’€ reminder bestie: this is from the libqb manual, dated 2025-09-16, and it lives under the name LIBQB. no cap. now go foreach over something cute πŸ«ΆπŸ’–
πŸ“¦ where this page comes from