s = somestring/somedelimiter.randomcharacters12345If I use / as a delimiter, the only thing that should be kept is:
somestringHow would I accomplish this in LUA?
Posted 21 December 2015 - 08:24 PM
s = somestring/somedelimiter.randomcharacters12345If I use / as a delimiter, the only thing that should be kept is:
somestringHow would I accomplish this in LUA?
Posted 21 December 2015 - 08:39 PM
local yourString = "somestring/somedelimiter.randomcharacters12345"
local s = yourString:sub(1, yourString:find("/") - 1)
Edited by Dog, 21 December 2015 - 08:41 PM.
Posted 21 December 2015 - 08:45 PM
Dog, on 21 December 2015 - 08:39 PM, said:
local yourString = "somestring/somedelimiter.randomcharacters12345"
local s = yourString:sub(1, yourString:find("/") - 1)
0 members, 1 guests, 0 anonymous users