CSV files are a human readable format, they are literally just a new line for a new record and commas to separate attributes
You sure it wouldnt be easier to code your own solution for your usage? What do you want it for?
CSV? I could knock something like that in few hours, you probably could do so as well. All CSV really is is comma-separated list of values, where each row of data is separated by ENTER symbol (cr+lf on Windows, lf on mac and cr on linux).
So all you really need is first to read all the lines in the file into array of strings, then use string.split with delimiter set to “,” on each of those to get the values for the individual cells.
Yes, it is list of comma-separated values, human readable. However, you’ll probably need to handle stray extra whitespaces and possibly quotes. Naive “string.split” approach will faceplant on quotes, definitely.
Calls to string.format generates garbage.
Starting coroutines generates garbage.
Calling delegates in some cases may generate garbage.
Creating any reference type with new generates garbage.
Making a string generates garbage, because strings are immutable.
Any call that returns an array to you generates garbage.
So, you pretty much will always generate garbage.
Juust run the game through profiler and deal with this when it becomes a problem.
Its actually fairly easy to code yourself. We’ve done it, but there is one exception -
The format of a CSV file isn’t the same in every country.
For instance, in the United States, the C in CSV actually does mean using a comma; in France they use a semi-colon instead of a comma (for those of us who live and work internationally it irritates the living daylights out of you :P)
Heh, nope. So it creates issues when you are on a computer with Excel as US / English and try to open a CSV in the Canada / French or French / French format, or vice-versa. Its a headache.
From a coding perspective, expose a delimiter so its easily changeable and use the delimiter to separate the values being written out or being read in. That way people can easily change the delimiter to suit their country’s format for the CSV file.
It doesn’t matter what they use elsewhere. You don’t need to use CSV format either is you don’t want if a very long record list separated by a comma, a colon, or whatever you choose is what you need.
This is also an issue with JSON. No one parser will treat the period in exactly the same way as all the others. So it creates issues with the format.
We love JSON, but in creating serialized JSON data or middleware that utilizes the JSON format we have to explicitly explain how the JSON parser treats periods.
They all may have moved toward treating periods in the same way since we last game them a run through (which was admittedly a while back), but it has been an issue in the past.