public function getEstimatedNbColumns($maxTotalWidth)
    {
        $i = 0;
        $rowWidth = 0;

        while (isset($this->cells[$i])) {
            $rowWidth += StringUtil::getLength($this->cells[$i]);

            if ($rowWidth > $maxTotalWidth) {
                // Return previous number of columns
                return $i;
            }

            ++$i;
        }

        return $i;
    }
public function getEstimatedNbColumns($maxTotalWidth)
    {
        $i = 0;
        $rowWidth = 0;

        while (isset($this->cells[$i])) {
            $rowWidth += StringUtil::getLength($this->cells[$i]);

            if ($rowWidth > $maxTotalWidth) {
                // Return previous number of columns
                return $i;
            }

            ++$i;
        }

        return $i;
    }
public function getEstimatedNbColumns ( $ maxTotalWidth ) { $ i = 0 ; $ rowWidth = 0 ; while ( isset ( $ this -> cells [ $ i ] ) ) { $ rowWidth += StringUtil :: getLength ( $ this -> cells [ $ i ] ) ; if ( $ rowWidth > $ maxTotalWidth ) { // Return previous number of columns return $ i ; } ++ $ i ; } return $ i ; }
Returns an estimated number of columns for the given maximum width.

@param int $maxTotalWidth The maximum total width of the columns.

@return int The estimated number of columns.
Returns an estimated number of columns for the given maximum width .