6 stable releases

1.0.5 Dec 1, 2023
1.0.4 Sep 9, 2022
1.0.3 Jul 19, 2022
1.0.2 Jul 14, 2022
1.0.0 Jun 13, 2022

#112 in Text processing

Download history 78684/week @ 2024-07-19 74072/week @ 2024-07-26 77477/week @ 2024-08-02 75653/week @ 2024-08-09 71396/week @ 2024-08-16 68553/week @ 2024-08-23 70362/week @ 2024-08-30 82684/week @ 2024-09-06 77146/week @ 2024-09-13 120534/week @ 2024-09-20 127116/week @ 2024-09-27 131075/week @ 2024-10-04 119937/week @ 2024-10-11 107011/week @ 2024-10-18 99977/week @ 2024-10-25 496023/week @ 2024-11-01

850,299 downloads per month
Used in 27,589 crates (2 directly)

Apache-2.0 OR MIT

23KB
415 lines

utf16_iter

crates.io docs.rs

utf16_iter provides iteration by char over potentially-invalid UTF-16 &[u16] such that UTF-16 errors are replaced with the REPLACEMENT CHARACTER.

Iteration by Result<char,Utf16CharsError> is provided as an alternative that distinguishes unpaired surrogates from U+FFFD appearing in the input.

This is a no_std crate.

Licensing

TL;DR: Apache-2.0 OR MIT

Please see the file named COPYRIGHT.

Documentation

Generated API documentation is available online.

Release Notes

1.0.5

  • Add iteration by Result<char,Utf16CharsError>.

1.0.4

  • char_indices() implementation.

1.0.3

  • Tweak inlining.

1.0.2

  • Implemented DoubleEndedIterator.

1.0.1

  • Added as_slice() method.

1.0.0

The initial release.

No runtime deps