MONGOC_URI_COPY(3)

πŸ’… MONGOC_URI_COPY(3) πŸ’…

okay so bestie, welcome to the libmongoc corner of the manual β€” this is MONGOC_URI_COPY(3) and it's literally the shortest lil glow-up in the whole library. no cap.


✨ SYNOPSIS ✨

mongoc_uri_t *
mongoc_uri_copy (const mongoc_uri_t *uri);

like, that's it. that's the whole thing. she's compact. she's iconic. πŸŽ€


🌸 PARAMETERS 🌸

  • uri β€” a mongoc_uri_t. just hand her over, she's not gonna get hurt (it's const, she's safe 🫢).

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she do? she copies the entire contents of a URI. the whole thing. every last crumb. it's giving "duplicate everything, leave nothing behind" energy πŸ‘‘

entire contents. not part of it. not a vibe-check sample. the entire contents. periodt.


πŸ’– RETURNS πŸ’–

she gives you back a newly allocated mongoc_uri_t β€” brand new, fresh out the box, main character energy ✨

⚠️ bestie listen: that new mongoc_uri_t is yours to free with mongoc_uri_destroy(). don't just ghost her, okay? that's a leak and we don't do leaks in this house πŸ’€

also real talk: she may return NULL on invalid host. so do your vibe check before you dereference, iykyk πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc β€” the icons themselves 🌈


2009-present, MongoDB, Inc. β€” all the legal sparkle, preserved exactly πŸ’œ


mwah, that's the whole page bestie, go forth and copy those URIs responsibly πŸ§šβ€β™€οΈ

with love from libmongoc version 2.5.6, dated Oct 09, 2026 β€” see you in the next manpage, ily πŸ“

πŸ“¦ where this page comes from