|
| 02 May 2012 07:13 PM |
is it possible to break up a string into each of its characters? for example, of i have "hello world!", could i do something that would give me all separate strings like "h" "e" "l" "l" "o" " " "w" "o" "r" "l" "d" "!" ? |
|
|
| Report Abuse |
|
|
|
| 02 May 2012 07:24 PM |
function getChars(String) local chars = {} for i = 1, String:len() do table.insert(chars, String:sub(i, i)) end return chars end
local charList = getChars("Hello, world!") print( type(charList) ) |
|
|
| Report Abuse |
|
|
|
| 02 May 2012 07:37 PM |
| thanks! with a little bit of editing i got it to do what I wanted it to do! what i am doing (if ur interested) is having a sentence type out on the players screen, but i wanted it to look like it was being typed. Awesome! |
|
|
| Report Abuse |
|
|
DXPower
|
  |
| Joined: 21 Oct 2008 |
| Total Posts: 2866 |
|
|
| 02 May 2012 08:04 PM |
:O AgentFirefox, your at your exact 17000'th post!!!
What exactness... With a Five-Guys burger in my hands, I am now invincible! |
|
|
| Report Abuse |
|
|