• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Some functions

Fallen

Freelancer
Senator
Joined
Aug 21, 2009
Messages
3,712
Reaction score
249
Location
Egypt
table functions:
Code:
function table_getInfo(tb, info)
	if info ~= nil then
		for _, v in ipairs(tb) do
			if v == info then
				return v
			end
		end
	elseif info == "size" then
		local k = 0
		for _, v in ipairs(tb) do
			k = k + 1
		end
		return k
	end
end
--[[
example:
local t, v = {1, "hi", {1, "hi", "fuck", 0, "ok"}, "bye"}, nil
v = table_getInfo(t, "size")
v = table_getInfo(t, "hi")
return v
]]
strings functions:
Code:
function string:begin()
	return self:sub(1, 1)
end
function string:End()
	return self:sub(self:len(), self:len())
end
--[[
local str = "12345"
return str:begin() -> "1"
return str:End() -> "5"
]]
 
Last edited:
Back
Top