Searched refs:UnicodeWidthStr (Results 1 – 3 of 3) sorted by relevance
16 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 …]
99 pub trait UnicodeWidthStr { trait121 impl UnicodeWidthStr for str {
15 use unicode_width::UnicodeWidthStr;19 let width = UnicodeWidthStr::width(teststr);33 use unicode_width::UnicodeWidthStr;36 assert_eq!(UnicodeWidthStr::width(""), 2); // Woman37 assert_eq!(UnicodeWidthStr::width(""), 2); // Microscope38 assert_eq!(UnicodeWidthStr::width(""), 4); // Woman scientist