#AutoDescription - i hate manually modifying strings
1 messages · Page 1 of 1 (latest)
would it work with localization
probably a bit unnecessary honestly
as long as its a string, yeah
im a bit ashamed to say this but i have no clue what nesting means 😭
Something inside another thing, so having the inactive color and putting the Xmult box in the middle and then continuing with the inactive color
Porting this as a website or tool may be nice for keeping consistent colour text for descriptions
hmm true
so basically, i think this should work, i added a lot of comment in there explaining most of the stuff i did so it should be easy to modify everything inside
function removeParts(b,replace)
local partToRemove = {
"{C:",
"{X:",
"{s:",
}
if type(b) == "string" then
local finalStr = b
for _,part in pairs(partToRemove) do
if string.find(finalStr,part) then
local startPos = string.find(finalStr,part)
local foundPart = findPart(finalStr,startPos,"}")
finalStr = finalStr:gsub(foundPart,"")
end
end
finalStr = finalStr:gsub("{}","")
local startPos = 0
if replace then
for g = 1, #finalStr do
local character = finalStr:sub(g,g)
if character == "#" then
startPos = g
break
end
end
finalStr = finalStr:gsub("#"..findPart(finalStr,startPos + 1,"#"),replace)
end
return finalStr
end
end```
heres something i made on the side too lol
basically the exact opposite
im pretty new to this whole string manipulation stuff, so feel free to give feedback as to whats wrong in those
thats all tho, i aint working on this no more 😭
there was a bug with this, fixed it though