|
@ -33,7 +33,7 @@ |
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
|
.\" SUCH DAMAGE. |
|
|
.\" SUCH DAMAGE. |
|
|
.\" |
|
|
.\" |
|
|
.\" $OpenBSD: strspn.3,v 1.3 1996/08/19 08:34:25 tholo Exp $ |
|
|
|
|
|
|
|
|
.\" $OpenBSD: strspn.3,v 1.4 1999/06/04 16:30:01 aaron Exp $ |
|
|
.\" |
|
|
.\" |
|
|
.Dd June 29, 1991 |
|
|
.Dd June 29, 1991 |
|
|
.Dt STRSPN 3 |
|
|
.Dt STRSPN 3 |
|
@ -60,6 +60,20 @@ The |
|
|
.Fn strspn |
|
|
.Fn strspn |
|
|
function |
|
|
function |
|
|
returns the number of characters spanned. |
|
|
returns the number of characters spanned. |
|
|
|
|
|
.Sh EXAMPLES |
|
|
|
|
|
The following call to |
|
|
|
|
|
.Fn strspn |
|
|
|
|
|
will return 3, since the first three characters of string |
|
|
|
|
|
.Fa s |
|
|
|
|
|
are part of string |
|
|
|
|
|
.Fa charset : |
|
|
|
|
|
.Bd -literal -offset indent |
|
|
|
|
|
char *s = "foobar"; |
|
|
|
|
|
char *charset = "of"; |
|
|
|
|
|
size_t span; |
|
|
|
|
|
|
|
|
|
|
|
span = strspn(s, charset); |
|
|
|
|
|
.Ed |
|
|
.Sh SEE ALSO |
|
|
.Sh SEE ALSO |
|
|
.Xr index 3 , |
|
|
.Xr index 3 , |
|
|
.Xr memchr 3 , |
|
|
.Xr memchr 3 , |
|
|