BSON_ISSPACE(3)

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

ok so first things first: this page lives in section 3 of the manual, it's part of libbson, and the whole thing is literally just one tiny function called bson_isspace. she's small but she's mighty, iykyk πŸŽ€

✨ SYNOPSIS ✨

bool
bson_isspace (int c);

that's it. that's the whole vibe. one arg in, one bool out πŸ¦‹


🌸 PARAMETERS 🌸

  • c β€” a character. that's the entire description, no notes, she said what she said πŸ’…

πŸ’– DESCRIPTION πŸ’–

okay so bson_isspace is basically isspace's responsible older sister β€” she's described as a safer alternative to isspace with additional bounds checking ✨

here's the tea: she's equivalent to isspace, except she always returns false if c is out of the inclusive bounds [-1, 255]. so if you hand her some unhinged out-of-range number, she doesn't spiral, she doesn't invoke undefined behaviour, she just goes "nope, not whitespace, moving on" πŸ™ˆ lowkey iconic.

(in case you were wondering β€” yes, -1 is included. inclusive means inclusive, bestie 🫢)


πŸ”₯ RETURNS πŸ”₯

she returns a boolean telling you whether c is considered white-space, as determined by the isspace function. so: true = whitespace energy, false = not that 🌈


πŸ‘‘ AUTHOR πŸ‘‘

MongoDB, Inc


2009-present, MongoDB, Inc.


πŸ’€ friendly reminder: the only difference from isspace is that bounds check. don't go expecting extra features, she's giving exactly what the synopsis promised and nothing more.

ok bye bestie, go forth and safely check for spaces πŸ§šπŸ’œ

libbson, version 2.5.6 β€” dated Oct 09, 2026. mwah, that's the whole page, periodt. πŸ“

πŸ“¦ where this page comes from