Using string.split or :split() on strings with unique characters will error out any letters it does not recognize.
local myString = "Test_é❤️"
local splitString = myString:split("") -- or can also use string.split(myString, "")
print(splitString)
--[[
prints out:
▼ {
[1] = "T",
[2] = "e",
[3] = "s",
[4] = "t",
[5] = "_",
[6] = "�",
[7] = "�",
[8] = "�",
[9] = "�",
[10] = "�",
[11] = "�",
[12] = "�",
[13] = "�"
}
]]
An example of usage:
SplitStringTest.rbxm (4.3 KB)
Expected behavior
I’m not sure if this was the intended behavior or not, but I was hoping it would recognize special letters and emojis. I believe there are work arounds, but nonetheless just wanted to report on this since it was causing me some issues.