Home
last modified time | relevance | path

Searched refs:UnicodeWidthStr (Results 1 – 3 of 3) sorted by relevance

/external/rust/crates/unicode-width/src/
Dtests.rs16 use super::{UnicodeWidthChar, UnicodeWidthStr};
102 b.iter(|| test::black_box(UnicodeWidthStr::width(string.as_str()))); in enwik8()
111 b.iter(|| test::black_box(UnicodeWidthStr::width(string.as_str()))); in jawiki()
115 use super::UnicodeWidthStr; in test_str()
117 assert_eq!(UnicodeWidthStr::width("hello"), 10); in test_str()
119 assert_eq!(UnicodeWidthStr::width("\0\0\0\x01\x01"), 0); in test_str()
121 assert_eq!(UnicodeWidthStr::width(""), 0); in test_str()
123 assert_eq!(UnicodeWidthStr::width("\u{2081}\u{2082}\u{2083}\u{2084}"), 4); in test_str()
130 use super::UnicodeWidthStr; in test_emoji()
132 assert_eq!(UnicodeWidthStr::width("��"), 2); // Woman in test_emoji()
[all …]
Dlib.rs99 pub trait UnicodeWidthStr { trait
121 impl UnicodeWidthStr for str {
/external/rust/crates/unicode-width/
DREADME.md15 use unicode_width::UnicodeWidthStr;
19 let width = UnicodeWidthStr::width(teststr);
33 use unicode_width::UnicodeWidthStr;
36 assert_eq!(UnicodeWidthStr::width("��"), 2); // Woman
37 assert_eq!(UnicodeWidthStr::width("��"), 2); // Microscope
38 assert_eq!(UnicodeWidthStr::width("��‍��"), 4); // Woman scientist