diff options
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.rs b/src/util.rs new file mode 100644 index 0000000..8de27e3 --- /dev/null +++ b/src/util.rs @@ -0,0 +1,4 @@ +/// Clean the message from newlines and carriage returns and convert it to lowercase. +pub fn clean_message(text: &str) -> String { + text.replace("\n", "").replace("\r", "").to_lowercase() +}
\ No newline at end of file |