I have a sequence that looks like this:
coordinates = '15,-2,-3,15'
This sequence corresponds to points, specifically A(15, -2), B(-3, 15)
.
Q How can you retrieve the data from a string in this format?
It would be ideal to obtain the results as an array of a custom structure (e.g., point[i].x, point[i].y
), but using a multidimensional array is also acceptable (e.g. point[i][0], point[i][1]
).