Welcome to little lamb

Code » limb » release » tree

[release] / src / doc / bytestr.h / byte_count.3.md

% limb manual
% byte_count(3)
% limb 0.1.0
% 2023-07-24

# NAME

byte_count - count occurrences of a byte in a byte array

# SYNOPSIS

    #include <limb/bytestr.h>

```pre hl
size_t byte_count(const char *<em>haystack</em>, size_t <em>hlen</em>, char <em>c</em>)
```

# DESCRIPTION

The `byte_count`() function returns the number of occurrences of byte `c` in the
byte array `haystack` of length `hlen`.

# RETURN VALUE

The `byte_count`() function returns the number of byte `c` in the byte array
`haystack`.