# mco_lews_startswith_ci
RT

### Prototype

        int mco_lews_startswith_ci(const char *buf, mco_uint2 start_pos, mco_uint2 buf_size, const char *str);

### Arguments

`buf`
Pointer to the data buffer to be examined.
`start_pos`
Starting offset within `buf` where the check begins.
`buf_size`
Total size (in bytes) of the buffer pointed to by `buf`.
`str`
Null-terminated string to check for as a prefix at the specified position.

### Description

> This function performs a case-insensitive check whether the buffer segment starting at `start_pos` begins with the null-terminated string `str`.

> The comparison respects the buffer bounds defined by `buf_size` and does not read beyond them.

>         while (i < in_buf_size) {
>             if (mco_lews_startswith_ci(in_buffer, i, in_buf_size, param_name)) {
>                 i += param_size;
>                 if (in_buffer[i] == '=') {
>                     i++;
>                     /* Process value... */
>                     ...

### Return Value

`1`
The string `str` is found as a prefix at position `start_pos`.
`0`
The string `str` is not found at the specified position, or the buffer is too short to contain it.

### Files

Header file:
mcoewslite.h
Source file:
mcoewslite.c
Library:
mcoewslite.a