STREND(3pub)
β¨ STREND π
okay bestie, so this is a page straight out of the C Programmer's Manual β the publib crew's very own corner of it β and it's about one tiny little function that does exactly one tiny little thing and does it flawlessly. no cap. let's get into it π¦
πΈ NAME πΈ
strend β returns a pointer to the terminating '\0' of a string
like. that's it. that's the whole job. and she ate. π
π SYNOPSIS π
#include <publib.h>
char *strend(const char *s);
you pull in <publib.h> (that's the header for the whole publib family, iykyk π«Ά) and then you call strend with a const char *s and get a char * back. simple. iconic. no drama. β¨
π DESCRIPTION π
so here's the vibe: strend will return a pointer to the '\0' that terminates a string. π―
that's the entire personality. you hand her a string, she hands you back a pointer aimed right at the null terminator β the little '\0' at the very end that tells everyone else the string is done. she doesn't copy anything, she doesn't allocate anything, she doesn't touch your data (note the const on s, she's respectful π). she just points. lowkey the most well-behaved function in the whole library fr fr.
π SEE ALSO π
publib(3)β the whole squad, if you wanna meet the rest of the family π
π AUTHOR π
Lars Wirzenius (lars.wirzenius@helsinki.fi) β the legend, the moment, the main character who wrote this π«Άπ
okay and for the cute sign-off: this whole page lives in the Publib release, filed under the C Programmer's Manual π so if you ever forget where you found it, it was right here in publib's section of the manual, babes. go point at some null terminators, you've got this π¦β¨π
π¦ where this page comes from
- debian bookworm: publib-dev 0.40-3+b1 Β· BSD-2-Clause
- debian trixie: publib-dev 0.40-4 Β· BSD-2-Clause
- ubuntu jammy: publib-dev 0.40-3build1 Β· BSD-2-Clause
- ubuntu noble: publib-dev 0.40-3build1 Β· BSD-2-Clause
- ubuntu questing: publib-dev 0.40-4
- ubuntu resolute: publib-dev 0.40-4build1 Β· BSD-2-Clause
- ubuntu stonking: publib-dev 0.40-4build1 Β· BSD-2-Clause
- Copyright (c) 1994-2006 Lars Wirzenius. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms