Browse Source

add an example; pattonme@ns.ra.pae.osd.mil

OPENBSD_2_6
aaron 25 years ago
parent
commit
db99fe1889
1 changed files with 15 additions and 1 deletions
  1. +15
    -1
      src/lib/libc/string/strspn.3

+ 15
- 1
src/lib/libc/string/strspn.3 View File

@ -33,7 +33,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" 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
.Dt STRSPN 3
@ -60,6 +60,20 @@ The
.Fn strspn
function
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
.Xr index 3 ,
.Xr memchr 3 ,


Loading…
Cancel
Save