% limb manual
% bytestr.h(0)
% limb 0.2.0
% 2024-01-09
# NAME
bytestr.h - byte arrays/strings functions
# SYNOPSIS
#include <limb/bytestr.h>
# DESCRIPTION
This header defines functions to work with byte arrays and/or strings.
They work on data not necessarily NUL-terminated, hence the requirement for
length, and return indices/offset within the array instead of pointers, as with
standard library functions.
<inc skalibs.md>
## Functions
The following functions are defined :
: [byte_chr](3)
:: Find the first occurence of a character (byte) in a byte array.
: [byte_count](3)
:: Returns the number of occurence of a character (byte) in a byte array.
: [byte_equal](3)
:: Returns whether two byte arrays are equal or not.
: [byte_get_match_full](3)
:: Find the (partial) match of a given string in an array.
: [byte_get_match](3)
:: Find the (partial) match of a given string in an array of strings.
: [byte_in](3)
:: Find the first occurence of any of the given bytes in a byte array.
: [byte_istr](3)
:: Similar to [byte_str](3) but performing case-insensitive comparisons.
: [byte_rchr](3)
:: Find the last occurence of a character (byte) in a byte array.
: [byte_str](3)
:: Find the first occurence of a byte array in another byte array.
: [byte_zzero](3)
:: Zero-out the content of a byte array.