File: README.md

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (50 lines) | stat: -rw-r--r-- 1,046 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# utf16_iter

[![crates.io](https://img.shields.io/crates/v/utf16_iter.svg)](https://crates.io/crates/utf16_iter)
[![docs.rs](https://docs.rs/utf16_iter/badge.svg)](https://docs.rs/utf16_iter/)

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](https://github.com/hsivonen/utf16_iter/blob/master/COPYRIGHT).

## Documentation

Generated [API documentation](https://docs.rs/utf16_iter/) 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.