| Crates.io | utf8-parser |
| lib.rs | utf8-parser |
| version | 0.1.1 |
| created_at | 2023-12-14 01:10:26.675893+00 |
| updated_at | 2025-02-01 00:15:52.690716+00 |
| description | A one-byte-at-a-time UTF-8 parser |
| homepage | |
| repository | https://github.com/Property404/utf8-parser |
| max_upload_size | |
| id | 1069014 |
| size | 39,205 |
A stateful one-byte-at-a-time UTF-8 parser. This is useful for things like building characters from bytes pulled from a UART.
#![no_std] friendly
use utf8_parser::Utf8Parser;
let mut parser = Utf8Parser::new();
assert!(parser.push(0xf0).unwrap().is_none());
assert!(parser.push(0x9f).unwrap().is_none());
assert!(parser.push(0x8e).unwrap().is_none());
assert_eq!(parser.push(0x84).unwrap(), Some('🎄'));
Licensed under either of
at your option.