Utf8.fromUtf8(): allow passing the length (#61)

The string could be non-zero-terminated, for example, or even if it is,
the length may be already known, in which case an unnecessary strlen()
call can be avoided.
2 files changed
tree: 3cc58448cc664f07172c8341a1e1f5b08c8c5765
  1. example/
  2. lib/
  3. test/
  4. .gitignore
  5. .travis.yml
  6. analysis_options.yaml
  7. AUTHORS
  8. CHANGELOG.md
  9. LICENSE
  10. pubspec.yaml
  11. README.md
README.md

Build Status

Utilities for working with Foreign Function Interface (FFI) code, incl. converting between Dart strings and C strings encoded with UTF-8 and UTF-16.

For additional details about Dart FFI (dart:ffi), see https://dart.dev/guides/libraries/c-interop.