Right and simple algorithm for determining no line breaks, one line break or two line breaks.