I am trying to extract strings that are stored in a table and concatenate all of them into a single string, with each of the original strings from the table separated by commas. The code that I have developed to do this (see below) works fine in the Corona simulator for Windows, but produces undesired results on the iOS simulator (and when I test it on an actual iPad). Below is my code that illustrates the problem more specifically:
local stringTable = { "hello", "what", "then", "how" } local concatString = table.concat( stringTable, ", " ) print( concatString )
output on Windows simulator:
hello, what, then, how
output on iOS simulator:
hello,
what,
then,
how
As shown above, the string prints output all on one line in the Windows simulator (as expected), whereas it creates a new line to separate each of the original strings on the iOS simulator. I am displaying this string to the user using display.newText(), so I need the string to look like the output from Windows simulator on iOS.
I have tested the code above on multiple builds, including 2016.2686, 2016.2873, and 2016.2874, so I do not think it is a problem with the build I am using. I am pretty sure that this problem is a bug on Corona’s end, but would be very glad to be proved wrong or offered a work-around solution