String addon
From SolarStrike wiki
string.alternate
string string.alternate(...)
This function will cycle through each value passed to it and return the values in order. That is, the first time this function is called, it will return the first value while the second time it is called it will return the second value and so on. This mainly is only useful in loops.
You should call this function with no parameters to reset the internal counter.
Example
for i =1,10 do
print( string.alternate("apple", "banana", "pineapple") );
end
string.alternate(); -- Reset it
-- This should print:
-- apple
-- banana
-- pineapple
-- apple
-- banana
-- pineapple
-- apple
-- banana
-- pineapple
-- apple