Commit: 0d338827f1a55cf2313162d73421ddc0af96fb3d
Parent: ca4f50cbc3e6c01c56ed8083e0b5d3aa864f7a08
Author: Ren Tatsumoto
Date: Thu, 24 Sep 2020 20:10:56 +0300
this should be faster
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/subs2srs.lua b/subs2srs.lua
@@ -70,7 +70,7 @@ local OSD
-- utility functions
function string:endswith(suffix)
- return self:match(string.format('%s$', suffix))
+ return suffix == "" or self:sub(-#suffix) == suffix
end
function table.contains(table, element)