mirror of
https://github.com/lifegpc/msg-tool.git
synced 2026-06-08 22:08:47 +08:00
Add features for each script type
This commit is contained in:
@@ -18,10 +18,16 @@ impl FixedFormatter {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "circus")]
|
||||
fn is_circus(&self) -> bool {
|
||||
matches!(self.typ, Some(ScriptType::Circus))
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "circus"))]
|
||||
fn is_circus(&self) -> bool {
|
||||
false
|
||||
}
|
||||
|
||||
pub fn format(&self, message: &str) -> String {
|
||||
let mut result = String::new();
|
||||
let vec: Vec<_> = UnicodeSegmentation::graphemes(message, true).collect();
|
||||
|
||||
Reference in New Issue
Block a user