int mco_lews_startswith(const char *buf, mco_uint2 start_pos, mco_uint2 buf_size, const char *str);
buf
start_pos
buf where the check begins.buf_size
buf.str
This function checks whether the null-terminated string
strmatches the contents of the bufferbufstarting at offsetstart_pos. The comparison is performed without exceeding the bounds defined bybuf_size.while (i < in_buf_size) { if (mco_lews_startswith(in_buffer, i, in_buf_size, param_name)) { i += param_size; if (in_buffer[i] == '=') { i++; /* Process value... */ ...
1
str is found as a prefix at position start_pos.0
str is not found at the specified position, or the buffer is too short to contain it.