aboutsummaryrefslogtreecommitdiff
path: root/src/utils/web.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2021-03-21 19:31:14 -0700
committerFuwn <[email protected]>2021-03-21 19:31:14 -0700
commitbc4ad74ca57049ae6b536c9ca5aeea865d236d99 (patch)
treeeebbd1658084018820b524cc55b0fe4cc36de211 /src/utils/web.rs
parentformat: Use single space for `user_properties` migration (diff)
downloadwhirl-bc4ad74ca57049ae6b536c9ca5aeea865d236d99.tar.xz
whirl-bc4ad74ca57049ae6b536c9ca5aeea865d236d99.zip
format: `utils` module as directory
Diffstat (limited to 'src/utils/web.rs')
-rw-r--r--src/utils/web.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utils/web.rs b/src/utils/web.rs
new file mode 100644
index 0000000..a834648
--- /dev/null
+++ b/src/utils/web.rs
@@ -0,0 +1,7 @@
+pub fn _is_double_crnl(window: &[u8]) -> bool {
+ window.len() >= 4
+ && (window[0] == '\r' as u8)
+ && (window[1] == '\n' as u8)
+ && (window[2] == '\r' as u8)
+ && (window[3] == '\n' as u8)
+}