My functions.


function setup()
    --displayMode(FULLSCREEN)
    r = {"Test", "Guys", "Government", "Song", "Simple", "Silly"}
    parameter.text("Txt")
end

function draw()
    background(0)
    --sprite("Cargo Bot:Game Area", WIDTH/2, HEIGHT/2, WIDTH, HEIGHT)
    fill(255)
    fontSize(50)
    for a, b in ipairs(oc_table_find(r, Txt)) do
        text(b, WIDTH/2, HEIGHT - 50 * a)
    end
end

oc_table_find = function(tab, str)
    local t = {}
    for a = 1, #tab do
        if string.sub(tab[a], 1, #str) == str then
            table.insert(t, #t + 1, tab[a])
        end
    end
    return t
end

Here is a good function for searching a string in table. I have much more of these functions, even about Code Protecting Alert, More classes of other types. Do you want them to be released?

@TokOut If you’re going to share a lot of your examples, maybe you can put them all in one discussion called TokOuts Collection. That way everything will be in one discussion and easy to find instead of scattered in different discussions.

@TokOut - the function is fine, but it is easy to write and won’t be needed very often, so I don’t think it’s something people will need to keep.

2 users want them, I release them.

https://raw.githubusercontent.com/TokOut/InOneClass/master/Class/v1.lua