summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/vobject/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vobject/lib.rs b/src/vobject/lib.rs
index fa28c7f..d5ff1ed 100644
--- a/src/vobject/lib.rs
+++ b/src/vobject/lib.rs
@@ -30,6 +30,11 @@ impl Property {
}
}
+ /// Create property from unescaped string.
+ pub fn new_from_string(s: &str) -> Property {
+ Property::new(HashMap::new(), escape_chars(s), None)
+ }
+
/// Get value as unescaped string.
pub fn value_as_string(&self) -> String {
unescape_chars(self.raw_value.as_slice())