strstrLen
Searches the string @haystack for the first occurrence of the string @needle, limiting the length of the search to @haystack_len or a nul terminator byte (whichever is reached first).
A length of -1
can be used to mean “search the entire string”, like strstr()
.
The fact that this function returns gchar *
rather than const gchar *
is a historical artifact.
Return
a pointer to the found occurrence, or NULL
if not found
Parameters
haystack
a string to search in
haystackLen
the maximum length of @haystack in bytes, or -1
to search it entirely
needle
the string to search for