// Auto generated by codegen/src/bindings.rs #include "simdutf.cpp" #include "simdutfrs_extra.cpp" extern "C" { bool simdutf_validate_ascii(const char *buf, size_t len) { return simdutf::validate_ascii(buf, len); } bool simdutf_validate_utf8(const char *buf, size_t len) { return simdutf::validate_utf8(buf, len); } bool simdutf_validate_utf16(const char16_t *buf, size_t len) { return simdutf::validate_utf16(buf, len); } bool simdutf_validate_utf16be(const char16_t *buf, size_t len) { return simdutf::validate_utf16be(buf, len); } bool simdutf_validate_utf16le(const char16_t *buf, size_t len) { return simdutf::validate_utf16le(buf, len); } bool simdutf_validate_utf32(const char32_t *buf, size_t len) { return simdutf::validate_utf32(buf, len); } simdutfrs_result_t simdutf_validate_ascii_with_errors(const char *buf, size_t len) { const simdutf::result ans = simdutf::validate_ascii_with_errors(buf, len); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_validate_utf8_with_errors(const char *buf, size_t len) { const simdutf::result ans = simdutf::validate_utf8_with_errors(buf, len); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_validate_utf16_with_errors(const char16_t *buf, size_t len) { const simdutf::result ans = simdutf::validate_utf16_with_errors(buf, len); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_validate_utf16be_with_errors(const char16_t *buf, size_t len) { const simdutf::result ans = simdutf::validate_utf16be_with_errors(buf, len); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_validate_utf16le_with_errors(const char16_t *buf, size_t len) { const simdutf::result ans = simdutf::validate_utf16le_with_errors(buf, len); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_validate_utf32_with_errors(const char32_t *buf, size_t len) { const simdutf::result ans = simdutf::validate_utf32_with_errors(buf, len); return {static_cast(ans.error), ans.count}; } size_t simdutf_count_utf8(const char *buf, size_t len) { return simdutf::count_utf8(buf, len); } size_t simdutf_count_utf16(const char16_t *buf, size_t len) { return simdutf::count_utf16(buf, len); } size_t simdutf_count_utf16be(const char16_t *buf, size_t len) { return simdutf::count_utf16be(buf, len); } size_t simdutf_count_utf16le(const char16_t *buf, size_t len) { return simdutf::count_utf16le(buf, len); } size_t simdutf_utf8_length_from_utf16(const char16_t *buf, size_t len) { return simdutf::utf8_length_from_utf16(buf, len); } size_t simdutf_utf8_length_from_utf16be(const char16_t *buf, size_t len) { return simdutf::utf8_length_from_utf16be(buf, len); } size_t simdutf_utf8_length_from_utf16le(const char16_t *buf, size_t len) { return simdutf::utf8_length_from_utf16le(buf, len); } size_t simdutf_utf8_length_from_utf32(const char32_t *buf, size_t len) { return simdutf::utf8_length_from_utf32(buf, len); } size_t simdutf_utf8_length_from_latin1(const char *buf, size_t len) { return simdutf::utf8_length_from_latin1(buf, len); } size_t simdutf_utf16_length_from_utf8(const char *buf, size_t len) { return simdutf::utf16_length_from_utf8(buf, len); } size_t simdutf_utf16_length_from_utf32(const char32_t *buf, size_t len) { return simdutf::utf16_length_from_utf32(buf, len); } size_t simdutf_utf16_length_from_latin1(size_t len) { return simdutf::utf16_length_from_latin1(len); } size_t simdutf_utf32_length_from_utf8(const char *buf, size_t len) { return simdutf::utf32_length_from_utf8(buf, len); } size_t simdutf_utf32_length_from_utf16(const char16_t *buf, size_t len) { return simdutf::utf32_length_from_utf16(buf, len); } size_t simdutf_utf32_length_from_utf16be(const char16_t *buf, size_t len) { return simdutf::utf32_length_from_utf16be(buf, len); } size_t simdutf_utf32_length_from_utf16le(const char16_t *buf, size_t len) { return simdutf::utf32_length_from_utf16le(buf, len); } size_t simdutf_latin1_length_from_utf8(const char *buf, size_t len) { return simdutf::latin1_length_from_utf8(buf, len); } size_t simdutf_latin1_length_from_utf16(size_t len) { return simdutf::latin1_length_from_utf16(len); } size_t simdutf_latin1_length_from_utf32(size_t len) { return simdutf::latin1_length_from_utf32(len); } size_t simdutf_convert_utf8_to_utf16(const char *src, size_t len, char16_t *dst) { return simdutf::convert_utf8_to_utf16(src, len, dst); } size_t simdutf_convert_utf8_to_utf16be(const char *src, size_t len, char16_t *dst) { return simdutf::convert_utf8_to_utf16be(src, len, dst); } size_t simdutf_convert_utf8_to_utf16le(const char *src, size_t len, char16_t *dst) { return simdutf::convert_utf8_to_utf16le(src, len, dst); } size_t simdutf_convert_utf8_to_utf32(const char *src, size_t len, char32_t *dst) { return simdutf::convert_utf8_to_utf32(src, len, dst); } size_t simdutf_convert_utf8_to_latin1(const char *src, size_t len, char *dst) { return simdutf::convert_utf8_to_latin1(src, len, dst); } size_t simdutf_convert_utf16_to_utf8(const char16_t *src, size_t len, char *dst) { return simdutf::convert_utf16_to_utf8(src, len, dst); } size_t simdutf_convert_utf16_to_utf32(const char16_t *src, size_t len, char32_t *dst) { return simdutf::convert_utf16_to_utf32(src, len, dst); } size_t simdutf_convert_utf16_to_latin1(const char16_t *src, size_t len, char *dst) { return simdutf::convert_utf16_to_latin1(src, len, dst); } size_t simdutf_convert_utf16be_to_utf8(const char16_t *src, size_t len, char *dst) { return simdutf::convert_utf16be_to_utf8(src, len, dst); } size_t simdutf_convert_utf16be_to_utf32(const char16_t *src, size_t len, char32_t *dst) { return simdutf::convert_utf16be_to_utf32(src, len, dst); } size_t simdutf_convert_utf16be_to_latin1(const char16_t *src, size_t len, char *dst) { return simdutf::convert_utf16be_to_latin1(src, len, dst); } size_t simdutf_convert_utf16le_to_utf8(const char16_t *src, size_t len, char *dst) { return simdutf::convert_utf16le_to_utf8(src, len, dst); } size_t simdutf_convert_utf16le_to_utf32(const char16_t *src, size_t len, char32_t *dst) { return simdutf::convert_utf16le_to_utf32(src, len, dst); } size_t simdutf_convert_utf16le_to_latin1(const char16_t *src, size_t len, char *dst) { return simdutf::convert_utf16le_to_latin1(src, len, dst); } size_t simdutf_convert_utf32_to_utf8(const char32_t *src, size_t len, char *dst) { return simdutf::convert_utf32_to_utf8(src, len, dst); } size_t simdutf_convert_utf32_to_utf16(const char32_t *src, size_t len, char16_t *dst) { return simdutf::convert_utf32_to_utf16(src, len, dst); } size_t simdutf_convert_utf32_to_utf16be(const char32_t *src, size_t len, char16_t *dst) { return simdutf::convert_utf32_to_utf16be(src, len, dst); } size_t simdutf_convert_utf32_to_utf16le(const char32_t *src, size_t len, char16_t *dst) { return simdutf::convert_utf32_to_utf16le(src, len, dst); } size_t simdutf_convert_utf32_to_latin1(const char32_t *src, size_t len, char *dst) { return simdutf::convert_utf32_to_latin1(src, len, dst); } size_t simdutf_convert_latin1_to_utf8(const char *src, size_t len, char *dst) { return simdutf::convert_latin1_to_utf8(src, len, dst); } size_t simdutf_convert_latin1_to_utf16(const char *src, size_t len, char16_t *dst) { return simdutf::convert_latin1_to_utf16(src, len, dst); } size_t simdutf_convert_latin1_to_utf16be(const char *src, size_t len, char16_t *dst) { return simdutf::convert_latin1_to_utf16be(src, len, dst); } size_t simdutf_convert_latin1_to_utf16le(const char *src, size_t len, char16_t *dst) { return simdutf::convert_latin1_to_utf16le(src, len, dst); } size_t simdutf_convert_latin1_to_utf32(const char *src, size_t len, char32_t *dst) { return simdutf::convert_latin1_to_utf32(src, len, dst); } simdutfrs_result_t simdutf_convert_utf8_to_utf16_with_errors(const char *src, size_t len, char16_t *dst) { const simdutf::result ans = simdutf::convert_utf8_to_utf16_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf8_to_utf16be_with_errors(const char *src, size_t len, char16_t *dst) { const simdutf::result ans = simdutf::convert_utf8_to_utf16be_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf8_to_utf16le_with_errors(const char *src, size_t len, char16_t *dst) { const simdutf::result ans = simdutf::convert_utf8_to_utf16le_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf8_to_utf32_with_errors(const char *src, size_t len, char32_t *dst) { const simdutf::result ans = simdutf::convert_utf8_to_utf32_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf8_to_latin1_with_errors(const char *src, size_t len, char *dst) { const simdutf::result ans = simdutf::convert_utf8_to_latin1_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf16_to_utf8_with_errors(const char16_t *src, size_t len, char *dst) { const simdutf::result ans = simdutf::convert_utf16_to_utf8_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf16_to_utf32_with_errors(const char16_t *src, size_t len, char32_t *dst) { const simdutf::result ans = simdutf::convert_utf16_to_utf32_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf16_to_latin1_with_errors(const char16_t *src, size_t len, char *dst) { const simdutf::result ans = simdutf::convert_utf16_to_latin1_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf16be_to_utf8_with_errors(const char16_t *src, size_t len, char *dst) { const simdutf::result ans = simdutf::convert_utf16be_to_utf8_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf16be_to_utf32_with_errors(const char16_t *src, size_t len, char32_t *dst) { const simdutf::result ans = simdutf::convert_utf16be_to_utf32_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf16be_to_latin1_with_errors(const char16_t *src, size_t len, char *dst) { const simdutf::result ans = simdutf::convert_utf16be_to_latin1_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf16le_to_utf8_with_errors(const char16_t *src, size_t len, char *dst) { const simdutf::result ans = simdutf::convert_utf16le_to_utf8_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf16le_to_utf32_with_errors(const char16_t *src, size_t len, char32_t *dst) { const simdutf::result ans = simdutf::convert_utf16le_to_utf32_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf16le_to_latin1_with_errors(const char16_t *src, size_t len, char *dst) { const simdutf::result ans = simdutf::convert_utf16le_to_latin1_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf32_to_utf8_with_errors(const char32_t *src, size_t len, char *dst) { const simdutf::result ans = simdutf::convert_utf32_to_utf8_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf32_to_utf16_with_errors(const char32_t *src, size_t len, char16_t *dst) { const simdutf::result ans = simdutf::convert_utf32_to_utf16_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf32_to_utf16be_with_errors(const char32_t *src, size_t len, char16_t *dst) { const simdutf::result ans = simdutf::convert_utf32_to_utf16be_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } simdutfrs_result_t simdutf_convert_utf32_to_utf16le_with_errors(const char32_t *src, size_t len, char16_t *dst) { const simdutf::result ans = simdutf::convert_utf32_to_utf16le_with_errors(src, len, dst); return {static_cast(ans.error), ans.count}; } size_t simdutf_convert_valid_utf8_to_utf16(const char *src, size_t len, char16_t *dst) { return simdutf::convert_valid_utf8_to_utf16(src, len, dst); } size_t simdutf_convert_valid_utf8_to_utf16be(const char *src, size_t len, char16_t *dst) { return simdutf::convert_valid_utf8_to_utf16be(src, len, dst); } size_t simdutf_convert_valid_utf8_to_utf16le(const char *src, size_t len, char16_t *dst) { return simdutf::convert_valid_utf8_to_utf16le(src, len, dst); } size_t simdutf_convert_valid_utf8_to_utf32(const char *src, size_t len, char32_t *dst) { return simdutf::convert_valid_utf8_to_utf32(src, len, dst); } size_t simdutf_convert_valid_utf8_to_latin1(const char *src, size_t len, char *dst) { return simdutf::convert_valid_utf8_to_latin1(src, len, dst); } size_t simdutf_convert_valid_utf16_to_utf8(const char16_t *src, size_t len, char *dst) { return simdutf::convert_valid_utf16_to_utf8(src, len, dst); } size_t simdutf_convert_valid_utf16_to_utf32(const char16_t *src, size_t len, char32_t *dst) { return simdutf::convert_valid_utf16_to_utf32(src, len, dst); } size_t simdutf_convert_valid_utf16_to_latin1(const char16_t *src, size_t len, char *dst) { return simdutf::convert_valid_utf16_to_latin1(src, len, dst); } size_t simdutf_convert_valid_utf16be_to_utf8(const char16_t *src, size_t len, char *dst) { return simdutf::convert_valid_utf16be_to_utf8(src, len, dst); } size_t simdutf_convert_valid_utf16be_to_utf32(const char16_t *src, size_t len, char32_t *dst) { return simdutf::convert_valid_utf16be_to_utf32(src, len, dst); } size_t simdutf_convert_valid_utf16be_to_latin1(const char16_t *src, size_t len, char *dst) { return simdutf::convert_valid_utf16be_to_latin1(src, len, dst); } size_t simdutf_convert_valid_utf16le_to_utf8(const char16_t *src, size_t len, char *dst) { return simdutf::convert_valid_utf16le_to_utf8(src, len, dst); } size_t simdutf_convert_valid_utf16le_to_utf32(const char16_t *src, size_t len, char32_t *dst) { return simdutf::convert_valid_utf16le_to_utf32(src, len, dst); } size_t simdutf_convert_valid_utf16le_to_latin1(const char16_t *src, size_t len, char *dst) { return simdutf::convert_valid_utf16le_to_latin1(src, len, dst); } size_t simdutf_convert_valid_utf32_to_utf8(const char32_t *src, size_t len, char *dst) { return simdutf::convert_valid_utf32_to_utf8(src, len, dst); } size_t simdutf_convert_valid_utf32_to_utf16(const char32_t *src, size_t len, char16_t *dst) { return simdutf::convert_valid_utf32_to_utf16(src, len, dst); } size_t simdutf_convert_valid_utf32_to_utf16be(const char32_t *src, size_t len, char16_t *dst) { return simdutf::convert_valid_utf32_to_utf16be(src, len, dst); } size_t simdutf_convert_valid_utf32_to_utf16le(const char32_t *src, size_t len, char16_t *dst) { return simdutf::convert_valid_utf32_to_utf16le(src, len, dst); } simdutfrs_result_t simdutf_base64_to_binary_safe(const char *input, size_t length, char *output, size_t *outlen, uint64_t options) { const simdutf::result res = simdutf::base64_to_binary_safe(input, length, output, *outlen, options); return {static_cast(res.error), res.count}; } size_t simdutf_binary_to_base64(const char *input, size_t length, char *output, uint64_t options) { return simdutf::binary_to_base64(input, length, output, options); } }