Add `Utf8`/`Utf16` methods for non-zero terminated strings
Open
package:ffi
- Dominant language
- Dart
- Stars
- 275
- Forks
- 144
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 47
Description
I find it odd that this package only provides support for null-terminated strings with the `Utf8` and `Utf16` marker types.
It's quite common these days to not use zero terminated strings, but to use string views which are ptr + size. This is done for example in Rust (`&str`) and C++ (`std::string_view`). Advantages over null-terminated strings are constant time length and no buffer overflows if you lose the `\0`.
Contributor guide
Assessment
This issue has not been assessed yet.