Skip to main content

needs_quoting

Function needs_quoting 

Source
pub fn needs_quoting(reference: &str) -> bool
Expand description

Whether one reference has to be quoted (or written as a versioned literal) to read back as exactly this text, that is whether quote_reference changes it.

ยงExamples

use links_notation::needs_quoting;

assert!(!needs_quoting("plain"));
assert!(needs_quoting("12:30"));
assert!(needs_quoting(""));