MS_STRNCPCLEAN(3)
π MS_STRNCPCLEAN(3) π
okay so bestie, this is a page from the Library Functions Manual and we're talking about MS_STRNCPCLEAN(3) β literally the string-copying girlies that do things a little differently than the standard library. no cap. π
β¨ NAME β¨
ms_strncpclean β non-standard string copying π¦
πΈ SYNOPSIS πΈ
#include <libmseed.h>
int ms_strncpclean ( char *dest, const char *source, int length );
int ms_strncpopen ( char *dest, const char *source, int length );
π DESCRIPTION π
okay so let's get into it, because there are two of these and they are NOT the same girl. π
ms_strncpclean copies up to length characters from source to dest while removing all spaces. the result is left justified and always NULL terminated. so like, the destination string must have enough room for the non-space characters within length AND the NULL terminator β that's a maximum of length + 1. do the math bestie, length + 1. πβ¨
ms_strncpopen copies length characters from source to dest, padding the right side with spaces if needed, and leaves the string open-ended (unterminated). so the result will always be length characters and will never be NULL terminated. it's giving "I don't do closures." π
not me stressing about these being unterminated β that's literally intentional, that's the whole point, don't come for her. π
these routines are useful for converting to and from known length SEED string fields. iykyk. π
π RETURN VALUES π
ms_strncpcleanreturns the number of characters (not including the terminating NULL) in the destination string. πms_strncpopenreturns the number of characters copied from the source string. π¦
β AUTHOR β
Chad Trabant IRIS Data Management Center
and that's the whole vibe, bestie β page from the Libmseed API, dated 2004/11/22, filed under MS_STRNCPCLEAN(3). slay, go copy some strings, just don't forget your NULL terminator. periodt. πβ¨ππ«Ά
π¦ where this page comes from
- debian bookworm: libmseed-doc 2.19.8-1 Β· LGPL-3.0-or-later
- debian trixie: libmseed-doc 2.19.8-1 Β· LGPL-3.0-or-later
- fedora 43: libmseed-devel 2.19.5-21.fc43 Β· LGPL-3.0-or-later
- fedora 43: libmseed-devel 2.19.5-21.fc43 Β· LGPL-3.0-or-later
- fedora 44: libmseed-devel 2.19.5-22.fc44 Β· LGPL-3.0-or-later
- fedora 44: libmseed-devel 2.19.5-22.fc44 Β· LGPL-3.0-or-later
- ubuntu jammy: libmseed-doc 2.19.6-3 Β· LGPL-3.0-or-later
- ubuntu noble: libmseed-doc 2.19.8-1ubuntu2 Β· LGPL-3.0-or-later
- ubuntu questing: libmseed-doc 2.19.8-1ubuntu2
- ubuntu resolute: libmseed-doc 2.19.8-1ubuntu3 Β· LGPL-3.0-or-later
- ubuntu stonking: libmseed-doc 2.19.8-1ubuntu3 Β· LGPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms