#ifndef LIBREGEXIS024_CODESET_H #define LIBREGEXIS024_CODESET_H #include #include #include #include typedef std::vector> codeset_t; codeset_t invert_set(const codeset_t& X); codeset_t merge_sets(const codeset_t& A, const codeset_t& B); codeset_t intersect_sets(const codeset_t& A, const codeset_t& B); codeset_t subtract_sets(const codeset_t& A, const codeset_t& B); /* Aborts if segment in question hit the edge (unsafe function) */ bool is_inside(uint32_t start, uint32_t end, codeset_t& X); codeset_t set_add_char(const codeset_t& X, uint32_t cp); codeset_t set_add_range(const codeset_t& X, uint32_t start, uint32_t end); codeset_t codeset_of_one_char(uint32_t ch); #define codeset_of_all codeset_t({{0, UINT32_MAX}}) std::string stringifyCodesetBase10(const codeset_t& CS); #endif //LIBREGEXIS024_CODESET_H