svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
index(3c)
index(3C) Standard C Library Functions index(3C)
NAME
index, rindex - string operations
SYNOPSIS
#include <strings.h>
char *index(const char *s, int c);
char *rindex(const char *s, int c);
DESCRIPTION
The index() and rindex() functions operate on null-terminated strings.
The index() function returns a pointer to the first occurrence of char‐
acter c in string s.
The rindex() function returns a pointer to the last occurrence of char‐
acter c in string s.
Both index() and rindex() return a null pointer if c does not occur in
the string. The null character terminating a string is considered to be
part of the string.
USAGE
These functions are provided for compatibility with older code. The
strchr() and strrchr() functions defined by the C standards are more
portable and preferred in newly written code.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelAsync-Signal-
Safe _ StandardT{
POSIX.1-2001,
SUS through SUSv3,
XPG4v2 through XPG6
T}
SEE ALSO
bstring(3C), strchr(3C), attributes(7), standards(7)
HISTORY
The index() and rindex() functions were added to libc in the Solaris
2.5 release. In Solaris 2 releases prior to 2.5 they were in the libucb
library.
Oracle Solaris 11.4 2 Jun 2022 index(3C)