strim(9)
π 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: thatNULreplacement happens in the given strings, 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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms