BSON_ITER_FIND_W_LEN(3)
π BSON_ITER_FIND_W_LEN π
okay so bestie, this one lives in the libbson manual and it's literally the "find my key but make it length-aware" function π she's giving precision, she's giving control, she's giving iykyk.
β¨ SYNOPSIS β¨
bool
bson_iter_find_w_len (bson_iter_t *iter, const char *key, int keylen);
πΈ PARAMETERS πΈ
iterβ abson_iter_t. that's your iterator bestie, the little scroller doing the actual walking πΆββοΈkeyβ a string containing the requested key. the thing you're hunting for πkeylenβ an integer indicating the length of the key string. you're telling her exactly how long the key is, no guessing, no cap π
π¦ DESCRIPTION π¦
so the bson_iter_find_w_len() function shall advance iter to the first element named key β or, if it can't find it, exhaust all the elements of iter. one of those two things, periodt β¨
if iter gets exhausted, false is returned and iter should be considered invalid. like, don't touch it, she's done, she's clocked out ππ
key is case-sensitive, highkey important. if you want the case-folded version instead, go see bson_iter_find_case() β she's the chill twin π«Ά
β RETURNS β
true is returned if the requested key was found π slay.
if not β iter was exhausted and should now be considered invalid. yeah. that's the whole vibe check and it failed π
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2009-present, MongoDB, Inc.
aaaand that's the whole page, bestie π§π this was libbson 2.5.6, dated Oct 09, 2026 β literally iconic, no notes, go read it again if you forgot something πβ¨
π¦ where this page comes from
- epel 10: libbson-devel 2.5.6-1.el10_3 Β· Apache-2.0 AND ISC AND MIT AND Zlib
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms