TbHtml::switchOffsetToCol PHP Method

switchOffsetToCol() protected static method

Nearly identical to {@link switchOffsetCol()} except it forces teh class to be returned as its column (e.g. "span") width counterpart. It is also safe to pass in a class that is already the column width and it will re-return it. For example, passing in col-md-offset-2 will return col-md-2. Passing in col-md-4 will still return col-md-4.
protected static switchOffsetToCol ( string $class ) : string
$class string
return string
    protected static function switchOffsetToCol($class)
    {
        // todo: why would you want to do this
        if (strpos($class, 'offset') !== false) {
            return str_replace('-offset', '', $class);
        } else {
            return $class;
        }
    }
TbHtml