C Collections

cstring · Section 3

cstr_find

cstr_find - find the first occurrence of a substring

C Collections (libccollections, -lccollections)

#include <ccollections/cstring.h>
 
cstr_find(s, needle);

This macro just forwards its arguments to cstring_find().

s        cstr to search
needle   Substring to find

The zero-based index of the first occurrence, or ccol_invalid_size when
the needle is not found

cstring_find(3), cstr_rfind(3)