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