Nuclear weak-interaction processes in stars