Add string.containsIgnoreCase

This commit is contained in:
Alfredo Cardigliano 2022-04-12 15:13:23 +02:00
parent 32635385fe
commit dc4e590501
2 changed files with 11 additions and 5 deletions

View file

@ -58,6 +58,12 @@ end
-- ##############################################
function string.containsIgnoreCase(str, start, is_plain)
return string.contains(string.lower(str), string.lower(start), is_plain)
end
-- ##############################################
function shortenString(name, max_len)
local ellipsis = "\u{2026}" -- The unicode ellipsis (takes less space than three separate dots)
if(name == nil) then return("") end