File: simdutf_wrapper.cpp

package info (click to toggle)
zsv 1.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 49,160 kB
  • sloc: ansic: 175,811; cpp: 56,301; sh: 3,623; makefile: 3,048; javascript: 577; cs: 90; awk: 70; python: 41; sql: 15
file content (11 lines) | stat: -rw-r--r-- 374 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
// simdutf_wrapper.cpp - C++ wrapper, exposes C ABI

#include "../external/simdutf/simdutf.h"
#include "../external/simdutf/simdutf.cpp"

extern "C" int simdutf_is_valid_utf8(const char *buf, size_t len) {
    // simdutf::validate_utf8 is part of the public API :contentReference[oaicite:1]{index=1}
    bool ok = simdutf::validate_utf8(buf, len);
    return ok ? 1 : 0;
}