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

#124 in Text processing

Download history 101550/week @ 2024-10-24 385836/week @ 2024-10-31 785143/week @ 2024-11-07 879483/week @ 2024-11-14 908777/week @ 2024-11-21 970524/week @ 2024-11-28 1085772/week @ 2024-12-05 1136376/week @ 2024-12-12 850598/week @ 2024-12-19 699085/week @ 2024-12-26 1106519/week @ 2025-01-02 1418602/week @ 2025-01-09 1425617/week @ 2025-01-16 1427821/week @ 2025-01-23 1571709/week @ 2025-01-30 1663275/week @ 2025-02-06

6,355,452 downloads per month
Used in 29,915 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