Commit | Line | Data |
---|---|---|
42a98e0d KB |
1 | .\" Copyright (c) 1990 The Regents of the University of California. |
2 | .\" All rights reserved. | |
3 | .\" | |
4 | .\" This code is derived from software contributed to Berkeley by | |
5 | .\" Chris Torek. | |
6 | .\" | |
7 | .\" %sccs.include.redist.man% | |
8 | .\" | |
9 | .\" @(#)rindex.3 5.1 (Berkeley) %G% | |
10 | .\" | |
11 | .TH RINDEX 3 "" | |
12 | .AT | |
13 | .SH NAME | |
14 | rindex \- locate character in string | |
15 | .SH SYNOPSIS | |
16 | .nf | |
17 | .ft B | |
18 | #include <string.h> | |
19 | ||
20 | char * | |
21 | rindex(const char *s, int c); | |
22 | .ft R | |
23 | .fi | |
24 | .SH DESCRIPTION | |
25 | .B Rindex | |
26 | returns a pointer to the last occurrence of character | |
27 | .I c | |
28 | (converted to a | |
29 | .BR char ) | |
30 | in the null-terminated string | |
31 | .IR s , | |
32 | or NULL if | |
33 | .I c | |
34 | does not occur anywhere in | |
35 | .IR s . | |
36 | If | |
37 | .I c | |
38 | is '\e0', | |
39 | .B rindex | |
40 | locates the terminating '\e0'. | |
41 | .SH SEE ALSO | |
42 | index(3), memchr(3), strchr(3), strcspn(3), strpbrk(3), strrchr(3), | |
43 | strsep(3), strspn(3), strstr(3), strtok(3) |