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.
This header is a complement to skalibs' own header, intended to be used as a "replacement". However, instead of re-inventing the wheel, it depends/includes skalibs' header, and some of the functions below are actually implemented in skalibs, or macros to such functions.
Functions
The following functions are defined :
Find the first occurence of a character (byte) in a byte array.
Returns the number of occurence of a character (byte) in a byte array.
Returns whether two byte arrays are equal or not.
Find the (partial) match of a given string in an array.
Find the (partial) match of a given string in an array of strings.
Find the first occurence of any of the given bytes in a byte array.
Similar to byte_str(3) but performing case-insensitive comparisons.
Find the last occurence of a character (byte) in a byte array.
Find the first occurence of a byte array in another byte array.
Zero-out the content of a byte array.