unicode-utf8

Crates.iounicode-utf8
lib.rsunicode-utf8
version0.1.3
sourcesrc
created_at2023-03-31 08:22:24.164326
updated_at2023-03-31 08:28:53.734055
descriptionA library that converts utf-8 bytes to a unicode scalar value, and vice versa
homepage
repositoryhttps://github.com/xmh0511/char-from-utf8
max_upload_size
id826143
size5,715
(xmh0511)

documentation

README

A library that converts utf-8 bytes to a unicode scalar value, and vice versa

use unicode_utf8::{FromUtf8,ToUtf8};
fn main(){
	let r:char = char::from_utf8(&[0xE6,0x88,0x91]).unwrap();
	println!("{r}");

	let r = 0x6211u32.to_utf8().unwrap();
	println!("{r:X?}");
}
Commit count: 7

cargo fmt