summaryrefslogtreecommitdiffstats
path: root/src/style.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/style.rs')
-rw-r--r--src/style.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/style.rs b/src/style.rs
index bfdbbeae..51403130 100644
--- a/src/style.rs
+++ b/src/style.rs
@@ -85,6 +85,10 @@ impl Style {
}
}
+ pub fn is_applied_to(&self, s: &str) -> bool {
+ s.starts_with(&self.ansi_term_style.prefix().to_string())
+ }
+
pub fn to_painted_string(&self) -> ansi_term::ANSIGenericString<str> {
self.paint(self.to_string())
}