INDEX

Section: C Library Functions (3)
Index Return to Main Contents

BSD mandoc
 

NAME

index - locate character in string  

SYNOPSIS

Fd #include <string.h> Ft char * Fn index const char *s int c  

DESCRIPTION

The Fn index function locates the first character matching Fa c (converted to a char in the null-terminated string Fa s .  

RETURN VALUES

The character Fa c is returned if it is found; otherwise NULL is returned. If Fa c is '\0', Fn index locates the terminating '\0'.  

SEE ALSO

memchr(3), rindex(3), strchr(3), strcspn(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3), strtok(3)  

HISTORY

A Fn index function appeared in AT&T System v6 .


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
SEE ALSO
HISTORY

This document was created by man2html, using the manual pages.
Time: 21:44:10 GMT, August 05, 2022