NE_STRPARAM(3)
π NE_STRPARAM(3) β like, the neon API reference bestie β¨
okay so this is ne_strparam from the neon API reference, and honestly? she's lowkey iconic for doing exactly one job and doing it flawlessly. π
πΈ NAME πΈ
ne_strparam β HTTP extended parameter value encoding. periodt, that's the whole vibe. β¨
π¦ SYNOPSIS π¦
#include <ne_string.h>
char *ne_strparam(const char *charset, const char *lang,
const char *value);
like, that's the signature, copy it exactly bestie, I'm begging π
π DESCRIPTION π
okay so the way that ne_strparam works is that it encodes an extended parameter value for an HTTP header, exactly as defined in RFC 5987 π. She takes these arguments: the value you wanna encode, the MIME charset character set to use, and a lang language tag. The whole extended parameter encoding thing exists in HTTP protocol specs so you can embed special characters β think quote marks, separators, or straight-up non-ASCII β into header values without it being a whole crisis. no cap, it's giving "let me handle that for you" π
In accordance with RFC 5987, the charset argument must be either "UTF-8" or "IS0-8859-1" β yes, that's literally how it's spelled in the page, keep it exactly as-is, don't @ me π β but the lang argument may be NULL. fr fr, NULL is fine there.
β¨ RETURN VALUE β¨
so the return value is one of these two things, and you gotta know which is which:
NULLβ this happens if the value parameter is a "regular parameter" and genuinely does not need extended encoding. she looked at it, said "you're fine as you are", and dipped π«Ά- non-
NULLβ this is the encoding of the input value as an extended parameter, handed back as aNUL-terminated,malloc-allocated string. so yeah, it's yours now, you own that memory, bestie π
π°οΈ HISTORY π°οΈ
ne_strparam is available in neon 0.32.0 and later. so if you're on something older... girl. upgrade. π₯
π SEE ALSO π
- https://www.rfc-editor.org/rfc/rfc5987.html β the source material, the moment, the main character π
π COPYRIGHT π
Copyright Β© 2001-2026 Joe Orton πΈ
and that's the whole page!! π§ mwah, go encode something cute π
β neon Β· 03/20/2026 Β· signing off, bestie, you got this π
π¦ 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