From 95e0d4b3c9c6a1a518a0827a2d52e86c457ba875 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Tue, 6 Jan 2026 02:34:21 -0800 Subject: add season and episode info pages --- util.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util.lua') diff --git a/util.lua b/util.lua index da9702e..99f8fe8 100644 --- a/util.lua +++ b/util.lua @@ -22,6 +22,14 @@ function util.strip(str) return (str:gsub('^%s*(.-)%s*$', '%1')) end +function util.strip_ne(str) + if str == nil then + return nil + end + local str = util.strip(tostring(str)) + return str ~= '' and str or nil +end + -- skips over utf8 continuation bytes (10xxxxxx) -- valid positions range from 1 to #str + 1 (*after* the last byte) function util.utf8_seek(str, pos, n) -- cgit v1.2.3-70-g09d2