All is not lost. You can still use that B string to smite people who grab your bass without permission or call you a guitarist....
I always measure the new string against the old string and cut accordingly.
measure twice, cut once.