forum

Home / DeveloperSection / Forums / How to remove comma from array list?

How to remove comma from array list?

Royce Roy 4832 17-Oct-2014
I have an Arraylist where I place float values.

xEvent.add(fileTimeStamp);
            xEvent.add(x);
            xEvent.add(zCSV + "\n");

    String formatedString = xEvent.toString()
                                .replace("[", "") // remove the right bracket
                                .replace("]", "") // remove the left bracket
The problem is that the Arraylist places a comma to separate values. How can I get rid of this comma without getting rid of the comma that in some locales is used as the decimal mark? On the U.S. we use the period as the decimal mark, so removing all commas would work, however on countries where they use the comma as the decimal mark I would end up ruining the data.

Updated on 17-Oct-2014

Can you answer this question?


Answer

1 Answers

Liked By