local pattern = "Roblox" local start_index, end_index = string.find(s, pattern) print(start_index, end_index) -- Output: nil 參數 s: string The string to search within. pattern: string The pattern to search for in given string. init: number The starting index for the search.預設...
einstein’s solution is 100% right, but to fill the gap in your knowledge, you can do concatenation. It’d be written print(Vector.X … Vector.Y … Vector.Z), and would print exactly the same as what einstein suggests. create.roblox.com Documentation - Roblox Creator Hub Learn with ...
In lua 5.1, you can iterate of the characters of a string this in a couple of ways. The basic loop would be: for i = 1, #str do local c = str:sub (i,i) -- do something with c end. But it may be more efficient to use a pattern with string.gmatch () to get an iterator...
local pattern = "Roblox" local start_index, end_index = string.find(s, pattern) print(start_index, end_index) -- Output: nil 参数 s: string The string to search within. pattern: string The pattern to search for in given string. init: number The starting index for the search.默认...
local pattern = "Roblox" local start_index, end_index = string.find(s, pattern) print(start_index, end_index) -- Output: nil Parameters s: string The string to search within. pattern: string The pattern to search for in given string. init: number The starting index for the search....