Quick actions

cmd+k|ctrl+k

Navigation

Languages

EWWWWWW

Snippet info

Language

Lua

Visibility

public

Author

ren

Created

2024-04-24T20:44:55.450199Z

Updated

2024-05-30T12:25:44.458393Z

c = function(txt)
    local x = string.reverse(txt)
    local nt = ""
    local s = false
    for i = 1,#txt do
        if not s then
            s = true
            nt = nt..string.sub(x,i+1,i+1)
        else
            s = false
            nt = nt..string.sub(x,i-1,i-1)
        end
    end
    if #x%2~=0 then
        nt = nt..string.sub(x,#x,#x)
    end
    return nt
end
INFO