SS8_CONTAINS(3)                  Ssstr Manual                  SS8_CONTAINS(3)



NAME
       ss8_contains,  ss8_contains_cstr, ss8_contains_bytes, ss8_contains_ch -
       check if an ssstr byte string contains a string

SYNOPSIS
       #include <ss8str.h>

       bool ss8_contains(ss8str const *str, ss8str const *infix);
       bool ss8_contains_cstr(ss8str const *str, char const *infix);
       bool ss8_contains_bytes(ss8str const *str,
                               char const *infix, size_t infixlen);
       bool ss8_contains_ch(ss8str const *str, char ch);

DESCRIPTION
       ss8_contains() tests whether the ss8str at str contains as a  substring
       the  ss8str  at infix.  Behavior is undefined unless both str and infix
       point to valid ss8str objects.

       ss8_contains_cstr() tests whether the ss8str at str contains as a  sub‐
       string  the  null-terminated  byte string infix.  Behavior is undefined
       unless str points to a valid ss8str object and infix is  a  null-termi‐
       nated byte string.

       ss8_contains_bytes() tests whether the ss8str at str contains as a sub‐
       string the byte string of length infixlen located at  infix.   Behavior
       is  undefined  unless  str  points  to  a valid ss8str object and infix
       points to an array of at least infixlen bytes.

       ss8_contains_ch() tests whether the ss8str at str contains the byte ch.
       Behavior is undefined unless str points to a valid ss8str object.

RETURN VALUE
       All  4  functions return true if infix is found in str; otherwise, they
       return false.

SEE ALSO
       ss8_ends_with(3), ss8_find(3), ss8_starts_with(3), ssstr(7)



SSSTR                             2023-12-30                   SS8_CONTAINS(3)