X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Fstring.h;h=fcb1f3dc5cbc7a2e65b91bc40aa877ac0cf15a3e;hb=e1c526e9bad3f6e69391e94059096145390508d3;hp=8c688e903cc0c77e352e8eb858b05b262e37d14e;hpb=0e9b1a27ae0d06ede490aa0c96b8dc35624388d0;p=pdclib diff --git a/includes/string.h b/includes/string.h index 8c688e9..fcb1f3d 100644 --- a/includes/string.h +++ b/includes/string.h @@ -1,5 +1,3 @@ -/* $Id$ */ - /* 7.21 String handling This file is part of the Public Domain C Library (PDCLib). @@ -184,10 +182,29 @@ char * strerror( int errnum ) _PDCLIB_nothrow; */ size_t strlen( const char * s ) _PDCLIB_nothrow; +#if _PDCLIB_POSIX_MIN(2008098L) +/* Returns the length of the string s (excluding terminating '\0') or maxlen if + * no terminating '\0' is found in the first maxlen characters. + */ +size_t strnlen( const char * s, size_t maxlen ) _PDCLIB_nothrow; +#endif + #if _PDCLIB_POSIX_MIN(2008098L) || _PDCLIB_XOPEN_MIN(0) char * strdup( const char* src ) _PDCLIB_nothrow; char * strndup( const char* src, size_t n ) _PDCLIB_nothrow; #endif +#if _PDCLIB_BSD_SOURCE +size_t strlcpy( + char *_PDCLIB_restrict _Dst, + const char *_PDCLIB_restrict _Src, + size_t _DstSize) _PDCLIB_nothrow; + +size_t strlcat( + char *_PDCLIB_restrict _Dst, + const char *_PDCLIB_restrict _Src, + size_t _DstSize) _PDCLIB_nothrow; +#endif + _PDCLIB_END_EXTERN_C #endif