1.\" Copyright (c) 1990, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" Chris Torek and the American National Standards Committee X3, 6.\" on Information Processing Systems. 7.\" 8.\" %sccs.include.redist.man% 9.\" 10.\" @(#)strrchr.3 8.1 (Berkeley) 06/04/93 11.\" 12.Dd 13.Dt STRRCHR 3 14.Os 15.Sh NAME 16.Nm strrchr 17.Nd locate character in string 18.Sh SYNOPSIS 19.Fd #include <string.h> 20.Ft char * 21.Fn strrchr "const char *s" "int c" 22.Sh DESCRIPTION 23The 24.Fn strrchr 25function 26locates the last occurrence of 27.Fa c 28(converted to a char) 29in the string 30.Fa s . 31If 32.Fa c 33is 34.Ql \e0 , 35.Fn strrchr 36locates the terminating 37.Ql \e0 . 38.Sh RETURN VALUES 39The 40.Fn strrchr 41function 42returns a pointer to the character, 43or a null 44pointer if 45.Fa c 46does not occur anywhere in 47.Fa s . 48.Sh SEE ALSO 49.Xr index 3 , 50.Xr memchr 3 , 51.Xr rindex 3 , 52.Xr strchr 3 , 53.Xr strcspn 3 , 54.Xr strpbrk 3 , 55.Xr strsep 3 , 56.Xr strspn 3 , 57.Xr strstr 3 , 58.Xr strtok 3 59.Sh STANDARDS 60The 61.Fn strrchr 62function 63conforms to 64.St -ansiC . 65