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

#236 in Text processing

Download history 1044866/week @ 2024-11-30 1124509/week @ 2024-12-07 1129473/week @ 2024-12-14 689040/week @ 2024-12-21 802846/week @ 2024-12-28 1263394/week @ 2025-01-04 1417629/week @ 2025-01-11 1417441/week @ 2025-01-18 1455204/week @ 2025-01-25 1635017/week @ 2025-02-01 1694513/week @ 2025-02-08 1820909/week @ 2025-02-15 2332203/week @ 2025-02-22 2466590/week @ 2025-03-01 2503266/week @ 2025-03-08 2247552/week @ 2025-03-15

9,935,738 downloads per month
Used in 30,468 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