cstring · Section 3
cstr_rfind
NAME
cstr_rfind - find the last occurrence of a substring
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/cstring.h> cstr_rfind(s, needle);
DESCRIPTION
This macro just forwards its arguments to cstring_rfind(). The search starts from the end of the string and takes time linear in the length of the string plus the length of needle; cstring_rfind(3) has the details.
PARAMETERS
s cstr to search needle Substring to find
RETURN VALUE
The zero-based index of the last occurrence, or ccol_invalid_size when the needle is not found