From 6080dd101592a0442d7073f9d7c58f1ebd803d97 Mon Sep 17 00:00:00 2001 From: Charles Iliya Krempeaux Date: Mon, 25 Mar 2024 23:40:55 -0700 Subject: [PATCH] eol.IsEOL --- iseol.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 iseol.go diff --git a/iseol.go b/iseol.go new file mode 100644 index 0000000..f0ef62b --- /dev/null +++ b/iseol.go @@ -0,0 +1,20 @@ +package eol + +import ( + "sourcecode.social/reiver/go-eol/cr" + "sourcecode.social/reiver/go-eol/ff" + "sourcecode.social/reiver/go-eol/lf" + "sourcecode.social/reiver/go-eol/ls" + "sourcecode.social/reiver/go-eol/nel" + "sourcecode.social/reiver/go-eol/ps" + "sourcecode.social/reiver/go-eol/vt" +) + +func IsEOL(r rune) bool { + switch r { + case cr.Rune, ff.Rune, lf.Rune, ls.Rune, nel.Rune, ps.Rune, vt.Rune: + return true + default: + return false + } +}