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 72926/week @ 2024-08-14 68927/week @ 2024-08-21 67463/week @ 2024-08-28 82314/week @ 2024-09-04 79573/week @ 2024-09-11 102209/week @ 2024-09-18 123861/week @ 2024-09-25 130550/week @ 2024-10-02 122422/week @ 2024-10-09 114367/week @ 2024-10-16 103955/week @ 2024-10-23 276574/week @ 2024-10-30 762611/week @ 2024-11-06 874472/week @ 2024-11-13 908753/week @ 2024-11-20 753677/week @ 2024-11-27

3,422,710 downloads per month
Used in 28,074 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