I know some lawnmowers have a specific length rope for certain models. Not sure about generators, anyone have any idea?
The best bet is to purchase the specified replacement, or take the old one off first and measure it.
I hadn't thought of this since my college years, although your question reminded me of the time that I replace the pull starter on my parent's lawnmower and had to make do with a shorter one that the local dealer had in stock. Everything worked fine, although a week later when I went to start the mower again (and wasn't focused on the fact that the rope was shorter than originally) I nearly broke my fingers when the starter stopped a foot and a half before I was expecting it to.
Jim