inline size_t strchrcnt(const char *s, char c);
+// string character count
inline size_t
strchrcnt(const char *s, char c)
{
inline size_t strchrscnt(const char *s, const char *c);
+// string characters count
// Similar to strchrcnt(), but search for multiple characters.
inline size_t
strchrscnt(const char *s, const char *c)
#include "attr.h"
+// string null-byte
// Similar to strlen(3), but return a pointer instead of an offset.
#define strnul(s) \
({ \
inline bool strcaseeq(const char *s1, const char *s2);
+// strings case-insensitive equal
// streq(), but case-insensitive.
inline bool
strcaseeq(const char *s1, const char *s2)
inline bool streq(const char *s1, const char *s2);
+// strings equal
/* Return true if s1 and s2 compare equal. */
inline bool
streq(const char *s1, const char *s2)
#include "sizeof.h"
+// string format time
#define STRFTIME(dst, fmt, tm) strftime(dst, NITEMS(dst), fmt, tm)
#include "string/strspn/strrcspn.h"
+// string returns-pointer rear complement substring prefix length
#define stprcspn(s, reject) \
({ \
__auto_type s_ = (s); \
#include "string/strspn/strrspn.h"
+// string returns-pointer rear substring prefix length
// Available in Oracle Solaris as strrspn(3GEN).
// <https://docs.oracle.com/cd/E36784_01/html/E36877/strrspn-3gen.html>
#define stprspn(s, accept) \
#include "attr.h"
+// string returns-pointer substring prefix length
// Similar to strspn(3), but return a pointer instead of an offset.
// Similar to strchrnul(3), but search for any bytes not in 'accept'.
#define stpspn(s, accept) \
inline size_t strrcspn(const char *s, const char *reject);
+// string rear complement substring prefix length
inline size_t
strrcspn(const char *s, const char *reject)
{
inline size_t strrspn_(const char *s, const char *accept);
+// string rear substring prefix length
inline size_t
strrspn_(const char *s, const char *accept)
{
inline char *stpsep(char *s, const char *delim);
+// string returns-pointer separate
// Similar to strsep(3),
// but return the next token, and don't update the input pointer.
// Similar to strtok(3),