greyblake / whatlang-ffi

C bindings for whatlang Rust library
MIT License
9 stars 2 forks source link

Proposed new API: `whatlang_detectn` #7

Closed iwillspeak closed 3 years ago

iwillspeak commented 3 years ago

For some languages it is more preferable to pass a buffer and a length rather than a null-terminated string. I propose we add the following API for that:

uint8_t whatlang_detectn(const char* text, size_t len, struct whatlang_info* info);

Would you be open to a PR to add this method?