strim(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

okay bestie, welcome to strim(9) from the Kernel API Manual β€” she’s the little icon whose whole job is removing leading and trailing whitespace from @s. clean, crisp, no messy edges. periodt. ✨🧹

✨ SYNOPSIS ✨

char * strim (char *s );

πŸŽ€ ARGUMENTS πŸŽ€

  • s β€” the string that’s getting stripped. that’s the main character right there, fr fr. 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so here’s the tea: the first trailing whitespace gets replaced with a NUL-terminator inside the given string s. then strim returns a pointer to the first non-whitespace character in s. literally handing you the glow-up point after the trim. πŸ’…

heads up, bestie: that NUL replacement happens in the given string s, so this is not a read-only little peek β€” she’s changing the string you passed in. 😭

🌸 SEE ALSO 🌸

Kernel file ./tools/lib/string.c β€” go hang with the friend group: memdup(9), strtobool(9), strlcpy(9), skip_spaces(9), strreplace(9), memchr_inv(9). the whole crew ate. πŸ‘‘πŸ”₯


mwah πŸ’– this strim(9) page comes from ./tools/lib, dated October 2026. bye bestie β€” go trim something cute. πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from