function addCharToString(str, pos, chr, howMany, origPos)
if howMany == 0 then return str end
if not origPos then origPos = pos end
local stringVariation = str:sub(1, pos - 1) .. chr .. str:sub(pos + 1)
howMany = howMany - 1
return addCharToString(stringVariation, pos + origPos, chr, howMany, origPos)
end
@Enigma-nak köszönd meg.
Használat:
(Legutolsó komment)
function addCharToString(str, pos, chr, howMany, origPos)
if howMany == 0 then return str end
if not origPos then origPos = pos end
local stringVariation = str:sub(1, pos - 1) .. chr .. str:sub(pos + 1)
howMany = howMany - 1
return addCharToString(stringVariation, pos + origPos, chr, howMany, origPos)
end
@Enigma-nak köszönd meg.
Használat:
(Legutolsó komment)
Ez csak egy stringet illeszt be xy karakter után, nem kérdezi az előtte lévő szóközt amire nekem lenne szükségem, az a gond, hogy oda tegyen egy \\n-t ahól elérte a maximális betű hosszúságot az eddig nekem is sikerült.