// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#include <Rcpp.h>

using namespace Rcpp;

#ifdef RCPP_USE_GLOBAL_ROSTREAM
Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
#endif

// set_is_utf8_locale
void set_is_utf8_locale();
RcppExport SEXP _stringfish_set_is_utf8_locale() {
BEGIN_RCPP
    set_is_utf8_locale();
    return R_NilValue;
END_RCPP
}
// unset_is_utf8_locale
void unset_is_utf8_locale();
RcppExport SEXP _stringfish_unset_is_utf8_locale() {
BEGIN_RCPP
    unset_is_utf8_locale();
    return R_NilValue;
END_RCPP
}
// get_is_utf8_locale
bool get_is_utf8_locale();
RcppExport SEXP _stringfish_get_is_utf8_locale() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    rcpp_result_gen = Rcpp::wrap(get_is_utf8_locale());
    return rcpp_result_gen;
END_RCPP
}
// is_tbb
bool is_tbb();
RcppExport SEXP _stringfish_is_tbb() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    rcpp_result_gen = Rcpp::wrap(is_tbb());
    return rcpp_result_gen;
END_RCPP
}
// check_simd
void check_simd();
RcppExport SEXP _stringfish_check_simd() {
BEGIN_RCPP
    check_simd();
    return R_NilValue;
END_RCPP
}
// get_pcre2_info
List get_pcre2_info();
RcppExport SEXP _stringfish_get_pcre2_info() {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    rcpp_result_gen = Rcpp::wrap(get_pcre2_info());
    return rcpp_result_gen;
END_RCPP
}
// get_string_type
std::string get_string_type(SEXP x);
RcppExport SEXP _stringfish_get_string_type(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(get_string_type(x));
    return rcpp_result_gen;
END_RCPP
}
// materialize
SEXP materialize(SEXP x);
RcppExport SEXP _stringfish_materialize(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(materialize(x));
    return rcpp_result_gen;
END_RCPP
}
// sf_vector
SEXP sf_vector(size_t len);
RcppExport SEXP _stringfish_sf_vector(SEXP lenSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< size_t >::type len(lenSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_vector(len));
    return rcpp_result_gen;
END_RCPP
}
// sf_vector_create
SEXP sf_vector_create(size_t len);
RcppExport SEXP _stringfish_sf_vector_create(SEXP lenSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< size_t >::type len(lenSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_vector_create(len));
    return rcpp_result_gen;
END_RCPP
}
// slice_store_create
SEXP slice_store_create(size_t len);
RcppExport SEXP _stringfish_slice_store_create(SEXP lenSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< size_t >::type len(lenSEXP);
    rcpp_result_gen = Rcpp::wrap(slice_store_create(len));
    return rcpp_result_gen;
END_RCPP
}
// slice_store_create_with_size
SEXP slice_store_create_with_size(size_t len, size_t initial_slice_size);
RcppExport SEXP _stringfish_slice_store_create_with_size(SEXP lenSEXP, SEXP initial_slice_sizeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< size_t >::type len(lenSEXP);
    Rcpp::traits::input_parameter< size_t >::type initial_slice_size(initial_slice_sizeSEXP);
    rcpp_result_gen = Rcpp::wrap(slice_store_create_with_size(len, initial_slice_size));
    return rcpp_result_gen;
END_RCPP
}
// sf_assign
void sf_assign(SEXP x, size_t i, SEXP e);
RcppExport SEXP _stringfish_sf_assign(SEXP xSEXP, SEXP iSEXP, SEXP eSEXP) {
BEGIN_RCPP
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    Rcpp::traits::input_parameter< size_t >::type i(iSEXP);
    Rcpp::traits::input_parameter< SEXP >::type e(eSEXP);
    sf_assign(x, i, e);
    return R_NilValue;
END_RCPP
}
// sf_iconv
SEXP sf_iconv(SEXP x, const std::string from, const std::string to, int nthreads);
RcppExport SEXP _stringfish_sf_iconv(SEXP xSEXP, SEXP fromSEXP, SEXP toSEXP, SEXP nthreadsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    Rcpp::traits::input_parameter< const std::string >::type from(fromSEXP);
    Rcpp::traits::input_parameter< const std::string >::type to(toSEXP);
    Rcpp::traits::input_parameter< int >::type nthreads(nthreadsSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_iconv(x, from, to, nthreads));
    return rcpp_result_gen;
END_RCPP
}
// convert_to_sf_vector
SEXP convert_to_sf_vector(SEXP x, size_t length_out);
RcppExport SEXP _stringfish_convert_to_sf_vector(SEXP xSEXP, SEXP length_outSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    Rcpp::traits::input_parameter< size_t >::type length_out(length_outSEXP);
    rcpp_result_gen = Rcpp::wrap(convert_to_sf_vector(x, length_out));
    return rcpp_result_gen;
END_RCPP
}
// convert_to_sf
SEXP convert_to_sf(SEXP x);
RcppExport SEXP _stringfish_convert_to_sf(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(convert_to_sf(x));
    return rcpp_result_gen;
END_RCPP
}
// convert_to_slice_store
SEXP convert_to_slice_store(SEXP x, size_t length_out);
RcppExport SEXP _stringfish_convert_to_slice_store(SEXP xSEXP, SEXP length_outSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    Rcpp::traits::input_parameter< size_t >::type length_out(length_outSEXP);
    rcpp_result_gen = Rcpp::wrap(convert_to_slice_store(x, length_out));
    return rcpp_result_gen;
END_RCPP
}
// sf_nchar
IntegerVector sf_nchar(SEXP x, const std::string type, const int nthreads);
RcppExport SEXP _stringfish_sf_nchar(SEXP xSEXP, SEXP typeSEXP, SEXP nthreadsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    Rcpp::traits::input_parameter< const std::string >::type type(typeSEXP);
    Rcpp::traits::input_parameter< const int >::type nthreads(nthreadsSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_nchar(x, type, nthreads));
    return rcpp_result_gen;
END_RCPP
}
// sf_substr
SEXP sf_substr(SEXP x, IntegerVector start, IntegerVector stop, const int nthreads);
RcppExport SEXP _stringfish_sf_substr(SEXP xSEXP, SEXP startSEXP, SEXP stopSEXP, SEXP nthreadsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type start(startSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type stop(stopSEXP);
    Rcpp::traits::input_parameter< const int >::type nthreads(nthreadsSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_substr(x, start, stop, nthreads));
    return rcpp_result_gen;
END_RCPP
}
// c_sf_paste
SEXP c_sf_paste(List dots, SEXP sep, const int nthreads);
RcppExport SEXP _stringfish_c_sf_paste(SEXP dotsSEXP, SEXP sepSEXP, SEXP nthreadsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< List >::type dots(dotsSEXP);
    Rcpp::traits::input_parameter< SEXP >::type sep(sepSEXP);
    Rcpp::traits::input_parameter< const int >::type nthreads(nthreadsSEXP);
    rcpp_result_gen = Rcpp::wrap(c_sf_paste(dots, sep, nthreads));
    return rcpp_result_gen;
END_RCPP
}
// sf_collapse
SEXP sf_collapse(SEXP x, SEXP collapse);
RcppExport SEXP _stringfish_sf_collapse(SEXP xSEXP, SEXP collapseSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    Rcpp::traits::input_parameter< SEXP >::type collapse(collapseSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_collapse(x, collapse));
    return rcpp_result_gen;
END_RCPP
}
// sf_readLines
SEXP sf_readLines(const std::string file, const std::string encoding);
RcppExport SEXP _stringfish_sf_readLines(SEXP fileSEXP, SEXP encodingSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< const std::string >::type file(fileSEXP);
    Rcpp::traits::input_parameter< const std::string >::type encoding(encodingSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_readLines(file, encoding));
    return rcpp_result_gen;
END_RCPP
}
// sf_writeLines
void sf_writeLines(SEXP text, const std::string file, const std::string sep, const std::string na_value, const std::string encode_mode);
RcppExport SEXP _stringfish_sf_writeLines(SEXP textSEXP, SEXP fileSEXP, SEXP sepSEXP, SEXP na_valueSEXP, SEXP encode_modeSEXP) {
BEGIN_RCPP
    Rcpp::traits::input_parameter< SEXP >::type text(textSEXP);
    Rcpp::traits::input_parameter< const std::string >::type file(fileSEXP);
    Rcpp::traits::input_parameter< const std::string >::type sep(sepSEXP);
    Rcpp::traits::input_parameter< const std::string >::type na_value(na_valueSEXP);
    Rcpp::traits::input_parameter< const std::string >::type encode_mode(encode_modeSEXP);
    sf_writeLines(text, file, sep, na_value, encode_mode);
    return R_NilValue;
END_RCPP
}
// sf_grepl
LogicalVector sf_grepl(SEXP subject, SEXP pattern, const std::string encode_mode, const bool fixed, const int nthreads);
RcppExport SEXP _stringfish_sf_grepl(SEXP subjectSEXP, SEXP patternSEXP, SEXP encode_modeSEXP, SEXP fixedSEXP, SEXP nthreadsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type subject(subjectSEXP);
    Rcpp::traits::input_parameter< SEXP >::type pattern(patternSEXP);
    Rcpp::traits::input_parameter< const std::string >::type encode_mode(encode_modeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixed(fixedSEXP);
    Rcpp::traits::input_parameter< const int >::type nthreads(nthreadsSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_grepl(subject, pattern, encode_mode, fixed, nthreads));
    return rcpp_result_gen;
END_RCPP
}
// sf_split
SEXP sf_split(SEXP subject, SEXP split, const std::string encode_mode, const bool fixed, const int nthreads);
RcppExport SEXP _stringfish_sf_split(SEXP subjectSEXP, SEXP splitSEXP, SEXP encode_modeSEXP, SEXP fixedSEXP, SEXP nthreadsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type subject(subjectSEXP);
    Rcpp::traits::input_parameter< SEXP >::type split(splitSEXP);
    Rcpp::traits::input_parameter< const std::string >::type encode_mode(encode_modeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixed(fixedSEXP);
    Rcpp::traits::input_parameter< const int >::type nthreads(nthreadsSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_split(subject, split, encode_mode, fixed, nthreads));
    return rcpp_result_gen;
END_RCPP
}
// sf_gsub
SEXP sf_gsub(SEXP subject, SEXP pattern, SEXP replacement, const std::string encode_mode, const bool fixed, const int nthreads);
RcppExport SEXP _stringfish_sf_gsub(SEXP subjectSEXP, SEXP patternSEXP, SEXP replacementSEXP, SEXP encode_modeSEXP, SEXP fixedSEXP, SEXP nthreadsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type subject(subjectSEXP);
    Rcpp::traits::input_parameter< SEXP >::type pattern(patternSEXP);
    Rcpp::traits::input_parameter< SEXP >::type replacement(replacementSEXP);
    Rcpp::traits::input_parameter< const std::string >::type encode_mode(encode_modeSEXP);
    Rcpp::traits::input_parameter< const bool >::type fixed(fixedSEXP);
    Rcpp::traits::input_parameter< const int >::type nthreads(nthreadsSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_gsub(subject, pattern, replacement, encode_mode, fixed, nthreads));
    return rcpp_result_gen;
END_RCPP
}
// random_strings
SEXP random_strings(size_t N, IntegerVector string_size, std::string charset, std::string vector_mode);
RcppExport SEXP _stringfish_random_strings(SEXP NSEXP, SEXP string_sizeSEXP, SEXP charsetSEXP, SEXP vector_modeSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::RNGScope rcpp_rngScope_gen;
    Rcpp::traits::input_parameter< size_t >::type N(NSEXP);
    Rcpp::traits::input_parameter< IntegerVector >::type string_size(string_sizeSEXP);
    Rcpp::traits::input_parameter< std::string >::type charset(charsetSEXP);
    Rcpp::traits::input_parameter< std::string >::type vector_mode(vector_modeSEXP);
    rcpp_result_gen = Rcpp::wrap(random_strings(N, string_size, charset, vector_mode));
    return rcpp_result_gen;
END_RCPP
}
// sf_tolower
SEXP sf_tolower(SEXP x);
RcppExport SEXP _stringfish_sf_tolower(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_tolower(x));
    return rcpp_result_gen;
END_RCPP
}
// sf_toupper
SEXP sf_toupper(SEXP x);
RcppExport SEXP _stringfish_sf_toupper(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_toupper(x));
    return rcpp_result_gen;
END_RCPP
}
// sf_match
IntegerVector sf_match(SEXP x, SEXP table, const int nthreads);
RcppExport SEXP _stringfish_sf_match(SEXP xSEXP, SEXP tableSEXP, SEXP nthreadsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    Rcpp::traits::input_parameter< SEXP >::type table(tableSEXP);
    Rcpp::traits::input_parameter< const int >::type nthreads(nthreadsSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_match(x, table, nthreads));
    return rcpp_result_gen;
END_RCPP
}
// sf_compare
LogicalVector sf_compare(SEXP x, SEXP y, const int nthreads);
RcppExport SEXP _stringfish_sf_compare(SEXP xSEXP, SEXP ySEXP, SEXP nthreadsSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    Rcpp::traits::input_parameter< SEXP >::type y(ySEXP);
    Rcpp::traits::input_parameter< const int >::type nthreads(nthreadsSEXP);
    rcpp_result_gen = Rcpp::wrap(sf_compare(x, y, nthreads));
    return rcpp_result_gen;
END_RCPP
}
// c_sf_concat
SEXP c_sf_concat(SEXP x);
RcppExport SEXP _stringfish_c_sf_concat(SEXP xSEXP) {
BEGIN_RCPP
    Rcpp::RObject rcpp_result_gen;
    Rcpp::traits::input_parameter< SEXP >::type x(xSEXP);
    rcpp_result_gen = Rcpp::wrap(c_sf_concat(x));
    return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
    {"_stringfish_set_is_utf8_locale", (DL_FUNC) &_stringfish_set_is_utf8_locale, 0},
    {"_stringfish_unset_is_utf8_locale", (DL_FUNC) &_stringfish_unset_is_utf8_locale, 0},
    {"_stringfish_get_is_utf8_locale", (DL_FUNC) &_stringfish_get_is_utf8_locale, 0},
    {"_stringfish_is_tbb", (DL_FUNC) &_stringfish_is_tbb, 0},
    {"_stringfish_check_simd", (DL_FUNC) &_stringfish_check_simd, 0},
    {"_stringfish_get_pcre2_info", (DL_FUNC) &_stringfish_get_pcre2_info, 0},
    {"_stringfish_get_string_type", (DL_FUNC) &_stringfish_get_string_type, 1},
    {"_stringfish_materialize", (DL_FUNC) &_stringfish_materialize, 1},
    {"_stringfish_sf_vector", (DL_FUNC) &_stringfish_sf_vector, 1},
    {"_stringfish_sf_vector_create", (DL_FUNC) &_stringfish_sf_vector_create, 1},
    {"_stringfish_slice_store_create", (DL_FUNC) &_stringfish_slice_store_create, 1},
    {"_stringfish_slice_store_create_with_size", (DL_FUNC) &_stringfish_slice_store_create_with_size, 2},
    {"_stringfish_sf_assign", (DL_FUNC) &_stringfish_sf_assign, 3},
    {"_stringfish_sf_iconv", (DL_FUNC) &_stringfish_sf_iconv, 4},
    {"_stringfish_convert_to_sf_vector", (DL_FUNC) &_stringfish_convert_to_sf_vector, 2},
    {"_stringfish_convert_to_sf", (DL_FUNC) &_stringfish_convert_to_sf, 1},
    {"_stringfish_convert_to_slice_store", (DL_FUNC) &_stringfish_convert_to_slice_store, 2},
    {"_stringfish_sf_nchar", (DL_FUNC) &_stringfish_sf_nchar, 3},
    {"_stringfish_sf_substr", (DL_FUNC) &_stringfish_sf_substr, 4},
    {"_stringfish_c_sf_paste", (DL_FUNC) &_stringfish_c_sf_paste, 3},
    {"_stringfish_sf_collapse", (DL_FUNC) &_stringfish_sf_collapse, 2},
    {"_stringfish_sf_readLines", (DL_FUNC) &_stringfish_sf_readLines, 2},
    {"_stringfish_sf_writeLines", (DL_FUNC) &_stringfish_sf_writeLines, 5},
    {"_stringfish_sf_grepl", (DL_FUNC) &_stringfish_sf_grepl, 5},
    {"_stringfish_sf_split", (DL_FUNC) &_stringfish_sf_split, 5},
    {"_stringfish_sf_gsub", (DL_FUNC) &_stringfish_sf_gsub, 6},
    {"_stringfish_random_strings", (DL_FUNC) &_stringfish_random_strings, 4},
    {"_stringfish_sf_tolower", (DL_FUNC) &_stringfish_sf_tolower, 1},
    {"_stringfish_sf_toupper", (DL_FUNC) &_stringfish_sf_toupper, 1},
    {"_stringfish_sf_match", (DL_FUNC) &_stringfish_sf_match, 3},
    {"_stringfish_sf_compare", (DL_FUNC) &_stringfish_sf_compare, 3},
    {"_stringfish_c_sf_concat", (DL_FUNC) &_stringfish_c_sf_concat, 1},
    {NULL, NULL, 0}
};

void init_stringfish(DllInfo* dll);
void sf_export_functions(DllInfo* /* dll */);
RcppExport void R_init_stringfish(DllInfo *dll) {
    R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
    R_useDynamicSymbols(dll, FALSE);
    init_stringfish(dll);
    sf_export_functions(dll);
}
