8000 Add is_empty · unicode-rs/unicode-script@6c286e4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6c286e4

Browse files
committed
Add is_empty
1 parent ba42eb6 commit 6c286e4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ impl ScriptExtension {
4848
pub fn intersect(self, other: Self) -> Self {
4949
self.inner_intersect(other)
5050
}
51+
52+
/// Checks if the script extension is empty (unknown)
53+
pub fn is_empty(self) -> bool {
54+
self == ScriptExtension::Single(Script::Unknown)
55+
}
5156
}
5257

5358
impl From<char> for ScriptExtension {

0 commit comments

Comments
 (0)
0