diff options
Diffstat (limited to 'src/arg.rs')
-rw-r--r-- | src/arg.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/arg.rs b/src/arg.rs new file mode 100644 index 0000000..eaea67b --- /dev/null +++ b/src/arg.rs @@ -0,0 +1,8 @@ +use regex::{self, Regex}; + + +pub fn is_suggestion_id(s: &str) -> Result<bool, regex::Error> { + let re = Regex::new(r"^\d+$")?; + + Ok(re.is_match(s)) +} |