src/Graviton/RestBundle/HttpFoundation/LinkHeaderItem.php
private static function trimEdge($string, $char)
    {
        if (substr($string, 0, 1) == $char) {
            $string = substr($string, 1, -1);
        }

        return $string;
    }
private static function trimEdge($string, $char)
    {
        if (substr($string, 0, 1) == $char) {
            $string = substr($string, 1, -1);
        }

        return $string;
    }
private static function trimEdge ( $ string , $ char ) { if ( substr ( $ string , 0 , 1 ) == $ char ) { $ string = substr ( $ string , 1 , - 1 ) ; } return $ string ; }
trim edge of string if char maches

@param string $string string
@param string $char   char

@return string
trim edge of string if char maches