diff options
Diffstat (limited to '')
| -rw-r--r-- | libabort_stralen.3 | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/libabort_stralen.3 b/libabort_stralen.3 new file mode 100644 index 0000000..d2ef0d9 --- /dev/null +++ b/libabort_stralen.3 @@ -0,0 +1,53 @@ +.TH LIBABORT_STRALEN 3 LIBABORT +.SH NAME +libabort_stralen \- Get string length within a bounded size + +.SH SYNOPSIS +.nf +#include <libabort.h> + +size_t \fBlibabort_stralen\fP(const char *\fIstr\fP, size_t \fIsize\fP); + +#if !defined(LIBABORT_NO_SHORTHANDS) && !defined(stralen) +# define \fBstralen\fP libabort_stralen +#endif +.fi + +.SH DESCRIPTION +The +.BR libabort_stralen () +function returns the length of the NUL terminated string +.I str +but will not read more than +.I size +bytes. +.PP +If no NUL terminator is found within the first +.I size +bytes, or if +.I size +is zero, the +.BR libabort_stralen () +function calls +.BR abort (3). + +.SH RETURN VALUE +The +.BR libabort_stralen () +function returns the length of +.IR str . + +.SH ERRORS +The +.BR libabort_stralen () +function cannot fail. + +.SH HISTORY +The +.BR libabort_stralen () +function added in version 1.0 of +.BR libabort . + +.SH SEE ALSO +.BR libabort (7), +.BR libabort_stpacat (3) |
