📜  分隔字符串 roblox - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:13.083000             🧑  作者: Mango

代码示例1
local Message = "1:2" -- this is the message you want to split
local SplitMessage = string.split(Message, ":") -- the second arguement is where you want to split your message.
local Value1, Value2 = SplitMessage[1], SplitMessage[2] -- since split message returned an array, you can use array[1] and array[2] to get the values of the array.
print(Value1, Value2) -- // Prints out 1 and 2.