开源文档分享

index

Section: C Library Functions (3)
Updated: 2023-01-05
查看本页索引 返回目录
 

NAME

index, rindex - locate character in string  

LIBRARY

Standard C library (libc, -lc)  

SYNOPSIS

#include <strings.h>

[[deprecated]] char *index(const char *s, int c);
[[deprecated]] char *rindex(const char *s, int c);
 

DESCRIPTION

index() is identical to strchr(3).

rindex() is identical to strrchr(3).

Use strchr(3) and strrchr(3) instead of these functions.  

STANDARDS

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

strchr(3), strrchr(3)


 

Index

NAME
LIBRARY
SYNOPSIS
DESCRIPTION
STANDARDS
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 03:17:26 GMT, July 01, 2024