dotfiles from arch

This commit is contained in:
2025-09-28 11:39:12 +02:00
parent 75885729cd
commit d1c6923bbb
1358 changed files with 575835 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
local sfind = string.find
local ssub = string.sub
---@param text string
return function (text)
local current = 1
local lines = {}
lines[0] = 1
lines.size = #text
local i = 0
while true do
local pos = sfind(text,'[\r\n]', current)
if not pos then
break
end
i = i + 1
if ssub(text, pos, pos + 1) == '\r\n' then
current = pos + 2
else
current = pos + 1
end
lines[i] = current
end
return lines
end