Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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!

1 comment

0

string.sub or just do this

1 answer

✓ Accepted answer

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

4 comments

0

should be 2,#a

0

I can see how to implement this in my scripts! Thanks!

0

oh

0

you can edit it

This discussion is preserved as it was. New answers, comments, and votes are closed.