The most important factor is how far up the top barrel the string wraps, so you have a bit of leeway. Within reason, you can use a thinner string if you want your string to be longer, and a thicker one if you prefer it to be shorter, but of course as you stated, the size of the top will dictate this range of thickness.
Some top throwers just twist up their own string. I have received some string from Chris Neff, and it is far superior to other strings I have tried! However, I’ve had good look with Ace Hardware’s brand of cotton string. I can’t remember exactly how thick it is, but my calipers say about 2.5mm. It not as nice as even the string that comes with most tops, but it works well enough for me. Really the downside is that it doesn’t last as long, but you get miles of it for really cheap.
Just go there and look at it, and you should see a thickness that will work for you. Just make sure it’s cotton. What I do initially is to cut one longer than I’ll need, and knot it through the button at the length I think is close to right, try a throw, and adjust the length by moving the knot, until it’s turning over the right amount. Then I just cut off the excess. Once you have the right length for this kind of string, you can just use the old one to measure the new one.
The above assumes you’re talking about the small, commercially available tops, but could generally apply to larger tops or smaller tops.