public static function getStrong($str)
    {
        /*
         * Split the content by html tags.
         */
        $tree = preg_split(
            '/(<[^!]?[^>]+>(<![^>]+>)?)/',
            $str,
            -1,
            PREG_SPLIT_OFFSET_CAPTURE | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY
        );

        /*
         * Initiate variables.
         */
        $r = array();
        $line = '';
        $isInline = true;
        $oneLine = array();
        $lastWasTag = false;

        /*
         * Loop throu the tree.
         */
        foreach ($tree as $k => $elm) {
            /*
             * Check what kind of element this is.
             */
            $info;
            switch (self::_getTreeElm($elm[0], $info)) {
            case 'start':
                /*
                 * It's a starting tag
                 */
                $add = new Tag(
                    $info[1], /* The Tags Name */
                    array(self::parseAttrs($info[2])), /* The attributes */
                    array(
                        'generate',
                        ($info[3] == '/>' ? 'selfQlose' : 'doNotSelfQlose'),
                        'start',
                        (in_array($info[1], TagInfo::$inlineTags) ? 'inline' : null)
                    )
                );
                break;
            case 'end':
                /*
                 * It is a closing tag
                 */
                $add = Store::get();
                break;
            case 'comment':
            case 'content':
            default:
                /*
                 * It's something else
                 */
                $add = $elm[0];
                break;
            }

            /*
             * Add the current content to the output.
             */
            self::_toLine($add, $r, $line, $isInline, $oneLine, $lastWasTag);
        }

        /*
         * Check if there is still content in the current line
         * and add it to the return array.
         */
        if (strlen($line)) {
            $r[] = $line;
        }

        /*
         * implode the return array using line breaks and return the string.
         */

        return implode(Generator::getLineBreak(), $r).Generator::getLineBreak();
    }
public static function getStrong($str)
    {
        /*
         * Split the content by html tags.
         */
        $tree = preg_split(
            '/(<[^!]?[^>]+>(<![^>]+>)?)/',
            $str,
            -1,
            PREG_SPLIT_OFFSET_CAPTURE | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY
        );

        /*
         * Initiate variables.
         */
        $r = array();
        $line = '';
        $isInline = true;
        $oneLine = array();
        $lastWasTag = false;

        /*
         * Loop throu the tree.
         */
        foreach ($tree as $k => $elm) {
            /*
             * Check what kind of element this is.
             */
            $info;
            switch (self::_getTreeElm($elm[0], $info)) {
            case 'start':
                /*
                 * It's a starting tag
                 */
                $add = new Tag(
                    $info[1], /* The Tags Name */
                    array(self::parseAttrs($info[2])), /* The attributes */
                    array(
                        'generate',
                        ($info[3] == '/>' ? 'selfQlose' : 'doNotSelfQlose'),
                        'start',
                        (in_array($info[1], TagInfo::$inlineTags) ? 'inline' : null)
                    )
                );
                break;
            case 'end':
                /*
                 * It is a closing tag
                 */
                $add = Store::get();
                break;
            case 'comment':
            case 'content':
            default:
                /*
                 * It's something else
                 */
                $add = $elm[0];
                break;
            }

            /*
             * Add the current content to the output.
             */
            self::_toLine($add, $r, $line, $isInline, $oneLine, $lastWasTag);
        }

        /*
         * Check if there is still content in the current line
         * and add it to the return array.
         */
        if (strlen($line)) {
            $r[] = $line;
        }

        /*
         * implode the return array using line breaks and return the string.
         */

        return implode(Generator::getLineBreak(), $r).Generator::getLineBreak();
    }
public static function getStrong ( $ str ) { /*
         * Split the content by html tags.
         */ $ tree = preg_split ( '/(<[^!]?[^>]+>(<![^>]+>)?)/' , $ str , - 1 , PREG_SPLIT_OFFSET_CAPTURE | PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY ) ; /*
         * Initiate variables.
         */ $ r = array ( ) ; $ line = '' ; $ isInline = true ; $ oneLine = array ( ) ; $ lastWasTag = false ; /*
         * Loop throu the tree.
         */ foreach ( $ tree as $ k => $ elm ) { /*
             * Check what kind of element this is.
             */ $ info ; switch ( self :: _getTreeElm ( $ elm [ 0 ] , $ info ) ) { case 'start' : /*
                 * It's a starting tag
                 */ $ add = new Tag ( $ info [ 1 ] , /* The Tags Name */ array ( self :: parseAttrs ( $ info [ 2 ] ) ) , /* The attributes */ array ( 'generate' , ( $ info [ 3 ] == '/>' ? 'selfQlose' : 'doNotSelfQlose' ) , 'start' , ( in_array ( $ info [ 1 ] , TagInfo :: $ inlineTags ) ? 'inline' : null ) ) ) ; break ; case 'end' : /*
                 * It is a closing tag
                 */ $ add = Store :: get ( ) ; break ; case 'comment' : case 'content' : default : /*
                 * It's something else
                 */ $ add = $ elm [ 0 ] ; break ; } /*
             * Add the current content to the output.
             */ self :: _toLine ( $ add , $ r , $ line , $ isInline , $ oneLine , $ lastWasTag ) ; } /*
         * Check if there is still content in the current line
         * and add it to the return array.
         */ if ( strlen ( $ line ) ) { $ r [ ] = $ line ; } /*
         * implode the return array using line breaks and return the string.
         */ return implode ( Generator :: getLineBreak ( ) , $ r ) . Generator :: getLineBreak ( ) ; }
Tears the given string into its smalest possible parts and rebuilds it
so it will fit nicely into the markup generated by Xiphe\HTML

@param string $str the string that needs cleaning

@return string the cleaned string.
Tears the given string into its smalest possible parts and rebuilds it so it will fit nicely into the markup generated by Xiphe \ HTML