Possible Duplicate:
Is there a way to measure the remaining space of a line of text?
I have some text and want to put a \hrulefill at the end following by a period. However, if the text of the line comes too close to the end of the line, the rule is omitted and just a period results -- or -- a new line is created, the rule is omitted, and the line begins with a period.
How can I determine if there is enough space at the end of the line for a sizeable enough hrulefill of some specified length?