#include <rst/common-domain.def>
#include <rst/content-domain.def>

extern "C" {

#define OP( ret, name, ... ) \
    RET_PROT( ret, name, __VA_ARGS__ );

/* String manipulation */
OP( DOMAIN_TYPE, strcpy , DOMAIN_TYPE dest, const DOMAIN_TYPE src );
OP( DOMAIN_TYPE, strncpy, DOMAIN_TYPE dest, const DOMAIN_TYPE src, size_t count );
OP( DOMAIN_TYPE, strcat , DOMAIN_TYPE dest, const DOMAIN_TYPE src );
OP( DOMAIN_TYPE, strncat, DOMAIN_TYPE dest, const DOMAIN_TYPE src, size_t count );
OP( size_t     , strxfrm, DOMAIN_TYPE dest, const DOMAIN_TYPE src, size_t count );

/* String examination */
OP( size_t     , strlen , const DOMAIN_TYPE str );
OP( int        , strcmp , const DOMAIN_TYPE lhs, const DOMAIN_TYPE rhs );
OP( int        , strncmp, const DOMAIN_TYPE lhs, const DOMAIN_TYPE rhs, size_t count );
OP( int        , strcoll, const DOMAIN_TYPE lhs, const DOMAIN_TYPE rhs );
OP( DOMAIN_TYPE, strchr , const DOMAIN_TYPE str, int ch );
OP( DOMAIN_TYPE, strrchr, const DOMAIN_TYPE str, int ch );
OP( size_t     , strspn , const DOMAIN_TYPE dest, const DOMAIN_TYPE src );
OP( size_t     , strcspn, const DOMAIN_TYPE dest, const DOMAIN_TYPE src );
OP( DOMAIN_TYPE, strpbrk, const DOMAIN_TYPE dest, const char * breakset );
OP( DOMAIN_TYPE, strstr , const DOMAIN_TYPE str, const char* substr );
OP( DOMAIN_TYPE, strtok , DOMAIN_TYPE str, const char * delim );

#undef OP

}
