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 β€” str may be modified. this function is not out here being gentle. also, the return value may not be equal to str, 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 Β© 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