.\" Copyright (c) 1990, 1991 The Regents of the University of California. .\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Chris Torek and the American National Standards Committee X3, .\" on Information Processing Systems. .\" .\" %sccs.include.redist.man% .\" .\" @(#)strrchr.3 5.3 (Berkeley) 06/29/91 .\" .Dd .Dt STRRCHR 3 .Os .Sh NAME .Nm strrchr .Nd locate character in string .Sh SYNOPSIS .Fd #include .Ft char * .Fn strrchr "const char *s" "int c" .Sh DESCRIPTION The .Fn strrchr function locates the last occurrence of .Fa c (converted to a char) in the string .Fa s . If .Fa c is .Ql \e0 , .Fn strrchr locates the terminating .Ql \e0 . .Sh RETURN VALUES The .Fn strrchr function returns a pointer to the character, or a null pointer if .Fa c does not occur anywhere in .Fa s . .Sh SEE ALSO .Xr index 3 , .Xr memchr 3 , .Xr rindex 3 , .Xr strchr 3 , .Xr strcspn 3 , .Xr strpbrk 3 , .Xr strsep 3 , .Xr strspn 3 , .Xr strstr 3 , .Xr strtok 3 .Sh STANDARDS The .Fn strrchr function conforms to .St -ansiC .