Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you split a string into two strings in Roblox?

Asked by 4 years ago

Hi, I would like to know how to split strings. For example, python has a split() function which splits strings into two. I would like to know how to do that in Roblox.

Thanks to those who helped!

0
string.sub or just do this WikiBaseHealthFinder 40 — 4y

1 answer

Log in to vote
2
Answered by 4 years ago

local a = 'yoi' local b = a:sub(0,1) local c = a:sub(1,#a) print(b,c)

0
should be 2,#a WikiBaseHealthFinder 40 — 4y
0
I can see how to implement this in my scripts! Thanks! HomieFirePGN 137 — 4y
0
oh HomieFirePGN 137 — 4y
0
you can edit it HomieFirePGN 137 — 4y
Ad

Answer this question