I use the distance to the other tuning pegs.
Pull the string through the tuning peg and leave enough end to get to the next two tuning pegs. For the lower two strings, it's just a little bit shorter to get the perfect wind.
View attachment 46318
I use the method shown in the video @paranoid posted (#20). I never have tuning issues, string breaks, or premature string death. Been doing it that way for over 50 years. Obviously not on my locking tuners, or PRS guitars with the locking mass tuners.