NE_SHAVE(3)
π NE_SHAVE(3) β the neon API reference, bestie
okay so you're looking at ne_shave(3) from the neon API reference and honestly? it's a little icon. tiny function, big main character energy. let's get into it π«Ά
β¨ NAME β¨
ne_shave β trims the whitespace off a string. that's it. that's the whole job. and it ate π
π¦ SYNOPSIS π¦
#include <ne_string.h>
char *ne_shave(char *str, const char *whitespace);
look at those two args. str and whitespace. lowkey obsessed with how simple this is π
πΈ DESCRIPTION πΈ
so here's the vibe: ne_shave gives you back a chunk of str with all the leading and trailing characters that live in the whitespace array yeeted right off. no cap, that's it π§
heads up though, bestie βstrmay be modified. this function is not out here being gentle. also, the return value may not be equal tostr, so likeβ¦ don't assume it's the same pointer, fr fr π
π EXAMPLES π
this little code segment right here will output "fish" β iconic behaviour honestly π
char s[] = ".!.fish!.!";
puts(ne_shave(s, ".!"));
the way it just strips those .! characters off both ends and leaves you with pure fish. periodt. π₯
π COPYRIGHT π
Copyright Β© 2001-2026 Joe Orton π
and that's the whole page, bestie β this was the neon API reference, NE_SHAVE(3), dated 03/20/2026. go trim something. slay π
β¨π
π¦ where this page comes from
- arch rolling: neon 0.37.1-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms