summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraaron <>1999-06-04 16:30:01 +0000
committeraaron <>1999-06-04 16:30:01 +0000
commit4bf5bc4f4e34f89a6946a6bca47ab5d0eb2e4e09 (patch)
treeb6d4dfbd7f21691701315be1eed5de955ebdca2b
parentdcad6225a37155780e7764469b10969251848479 (diff)
downloadopenbsd-4bf5bc4f4e34f89a6946a6bca47ab5d0eb2e4e09.tar.gz
openbsd-4bf5bc4f4e34f89a6946a6bca47ab5d0eb2e4e09.tar.bz2
openbsd-4bf5bc4f4e34f89a6946a6bca47ab5d0eb2e4e09.zip
add an example; pattonme@ns.ra.pae.osd.mil
-rw-r--r--src/lib/libc/string/strspn.316
1 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/libc/string/strspn.3 b/src/lib/libc/string/strspn.3
index 7d15470dee..f8834dfecc 100644
--- a/src/lib/libc/string/strspn.3
+++ b/src/lib/libc/string/strspn.3
@@ -33,7 +33,7 @@
33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34.\" SUCH DAMAGE. 34.\" SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: strspn.3,v 1.3 1996/08/19 08:34:25 tholo Exp $ 36.\" $OpenBSD: strspn.3,v 1.4 1999/06/04 16:30:01 aaron Exp $
37.\" 37.\"
38.Dd June 29, 1991 38.Dd June 29, 1991
39.Dt STRSPN 3 39.Dt STRSPN 3
@@ -60,6 +60,20 @@ The
60.Fn strspn 60.Fn strspn
61function 61function
62returns the number of characters spanned. 62returns the number of characters spanned.
63.Sh EXAMPLES
64The following call to
65.Fn strspn
66will return 3, since the first three characters of string
67.Fa s
68are part of string
69.Fa charset :
70.Bd -literal -offset indent
71char *s = "foobar";
72char *charset = "of";
73size_t span;
74
75span = strspn(s, charset);
76.Ed
63.Sh SEE ALSO 77.Sh SEE ALSO
64.Xr index 3 , 78.Xr index 3 ,
65.Xr memchr 3 , 79.Xr memchr 3 ,