index(3)


NAME

   index, rindex - locate character in string

SYNOPSIS

   #include <strings.h>

   char *index(const char *s, int c);

   char *rindex(const char *s, int c);

DESCRIPTION

   The  index()  function returns a pointer to the first occurrence of the
   character c in the string s.

   The rindex() function returns a pointer to the last occurrence  of  the
   character c in the string s.

   The  terminating  null  byte  ('\0')  is considered to be a part of the
   strings.

RETURN VALUE

   The index() and rindex() functions return  a  pointer  to  the  matched
   character or NULL if the character is not found.

ATTRIBUTES

   For   an   explanation   of   the  terms  used  in  this  section,  see
   attributes(7).

   
   Interface          Attribute      Value   
   
   index(), rindex()  Thread safety  MT-Safe 
   

CONFORMING TO

   4.3BSD; marked as LEGACY in  POSIX.1-2001.   POSIX.1-2008  removes  the
   specifications  of  index()  and  rindex(),  recommending strchr(3) and
   strrchr(3) instead.

SEE ALSO

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

COLOPHON

   This  page  is  part of release 4.09 of the Linux man-pages project.  A
   description of the project, information about reporting bugs,  and  the
   latest     version     of     this    page,    can    be    found    at
   https://www.kernel.org/doc/man-pages/.


More Linux Commands

manpages/setfsuid.2.html
setfsuid(2) - set user identity used for file system checks
The system call setfsuid() changes the value of the callers filesystem user ID-the user ID that the Linux kernel uses to check for all accesses to the filesyste

manpages/Mail::SpamAssassin::Plugin::RelayCountry.3pm.html
Mail::SpamAssassin::Plugin::RelayCountry(3pm) - add message
By the RelayCountry plugin attempts to determine the domain country codes of each relay used in the delivery path of messages and add that information to the me

manpages/glRectfv.3gl.html
glRectfv(3gl) - draw a rectangle (Library - Linux man page)
glRect supports efficient specification of rectangles as two corner points. Each rectangle command takes four arguments, organized either as two consecutive pai

manpages/mperfmon.1.html
mperfmon(1) - Mono Performance Counter Monitor (Man Page)...
mperfmon is a tool that allows you to monitor performance counters exposed by Mono processes or by the operating system. With the --report option it can be used

manpages/sasl_client_step.3.html
sasl_client_step(3) - Perform a step in the authentication n
sasl_client_step() performs a step in the authentication negotiation. It returns SASL_OK if the whole negotiation is successful and SASL_CONTINUE if this step i

manpages/XkbGetControls.3.html
XkbGetControls(3) - Finds the current state of Xkb server co
XkbGetControls queries the server for the requested control information, waits for a reply, and then copies the servers values for the requested information int

manpages/fseek.3.html
fseek(3) - reposition a stream (Library - Linux man page)...
fseek.3 - The fseek() function sets the file position indicator for the stream pointed to by stream. The new position, measured in bytes, is obtained by adding

manpages/systemd-machine-id-setup.1.html
systemd-machine-id-setup(1) Initialize the machine ID in etc
systemd-machine-id-setup may be used by system installer tools to initialize the machine ID stored in /etc/machine-id at install time with a randomly generated

manpages/pthread_setconcurrency.3.html
pthread_setconcurrency(3) - set/get the concurrency level...
The pthread_setconcurrency() function informs the implementation of the applications desired concurrency level, specified in new_level. The implementation takes

manpages/vfprintf.3.html
vfprintf(3) - formatted output conversion - Linux man page
The functions in the printf() family produce output according to a format as described below. The functions printf() and vprintf() write output to stdout, the s

manpages/avahi-autoipd.action.8.html
avahi-autoipd.action(8) - avahi-autoipd action script.......
avahi-autoipd.action is the action script that is called whenever an IP address has been acquired by avahi-autoipd or when it detected an IP address conflict. T

manpages/FcConfigEnableHome.3.html
FcConfigEnableHome(3) - controls use of the home directory.
If enable is FcTrue, then Fontconfig will use various files which are specified relative to the users home directory (using the ~ notation in the configuration)





We can't live, work or learn in freedom unless the software we use is free.