I am loading lines from a text file with very large numbers. String has a toInt method, but how to convert a string to Int64 that can handle large numbers?
I do not see the method toInt64 or toLong, etc. There should be a way, but I haven't found anything yet by doing a search.
As an alternative, I assume that I could read the digits in a string digit by a digit (or groups of digits), and then add them along with the corresponding coefficients of ten, but this seems superfluous. Or maybe the right way is to read the data in binary form and convert it that way?
thanks
string long-integer xcode swift int64
shim
source share