====== Lua string split - разбить строку на кусочки ====== Эта функция разбивает строки в массив, не используя чёртов pattern как разделитель. function split(str, delimiter) local result, it = {}, string.find(str, delimiter, 1, true) if it then while it do table.insert(result, string.sub(str, 1, it-1)) str = string.sub(str, it + #delimiter) it = string.find(str, delimiter, 1, true) end table.insert(result, str) return result else return {str} end end