BSON_STRING_APPEND(3)

πŸ’… BSON_STRING_APPEND(3) β€” the libbson one, bestie

okay so real talk before we even start, because I love you and I need you to know what you're walking into πŸ‘€

⚠️ WARNING: Deprecated since version 1.29.0. She's retired, babes. Still documented, still real, but the maintainers have moved on and so should you. πŸ’€

✨ SYNOPSIS ✨

void
bson_string_append (bson_string_t *string, const char *str);

like… that's it. void return, two args, no drama. πŸŽ€


🫢 PARAMETERS 🫢

  • string β€” a bson_string_t. the main character, the one getting stuff added to her. πŸ’–
  • str β€” a string. the guest star, the one doing the adding. ✨

🌸 DESCRIPTION 🌸

So what she does is: she takes str β€” which can be ASCII or UTF-8 encoded, either one is fine, we don't discriminate here β€” and she appends it onto string. Glued right on the end. Slay. πŸ¦‹

BUT. And this is the important part, no cap:

🚨 She is NOT suitable for embedding NULLs in strings. Like, if you're trying to sneak a NULL in there, that's not her thing, that's not what she does, please don't. 😭

And ANOTHER thing, because the universe loves a caveat:

⚠️ WARNING: The length of the resulting string β€” and yes, including the NULL terminator, we count that too, bestie β€” MUST NOT exceed UINT32_MAX. Not "shouldn't". MUST NOT. That's a hard limit, that's a boundary, and we respect boundaries in this house. πŸ’…

πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” the icons, the legends, the ones who wrote this whole thing. 🫢


2009-present, MongoDB, Inc. β€” yes that's the whole range, they've been at this a minute, we love longevity. ✨


and that's the page!! πŸŽ€ sign-off time: this was brought to you by libbson, version 1.30.13, dated Oct 09, 2026 β€” so you know she's fresh, you know she's current, and yeah, the deprecated girlies still get their documentation. respect. πŸŒˆπŸ’– periodt.

πŸ“¦ where this page comes from