str is the string you want to split and c is the character you want to split it by.
so if you have a
. and you want it turned into a array/table you dostringName = "N E S W "
and it returns a nice table/arraytableName = splitToArray(stringName, " ")
only downside is that you need to add an extra chracter to split on or the last character will fall off..
so i added an extra space since that is what i'm splitting with
maybe it could be improved but overall i think very usefull.stringName = "N E S W".." "