Function quoted_string::strip_dquotes[][src]

pub fn strip_dquotes(quoted_string: &str) -> Option<&str>

strips quotes if they exists

returns None if the input does not start with " and ends with "

Example

use quoted_string::strip_dquotes;
assert_eq!(strip_dquotes("\"a b\""), Some("a b"));
assert_eq!(strip_dquotes("a b"), None);
assert_eq!(strip_dquotes("\"a b"), None);
assert_eq!(strip_dquotes("a b\""), None);