Wallabag\CoreBundle\Twig\WallabagExtension::removeWww PHP Method

removeWww() public method

public removeWww ( $url )
    public function removeWww($url)
    {
        return preg_replace('/^www\\./i', '', $url);
    }

Usage Example

 public function testRemoveWww()
 {
     $extension = new WallabagExtension();
     $this->assertEquals('lemonde.fr', $extension->removeWww('www.lemonde.fr'));
     $this->assertEquals('lemonde.fr', $extension->removeWww('lemonde.fr'));
     $this->assertEquals('gist.github.com', $extension->removeWww('gist.github.com'));
 }
All Usage Examples Of Wallabag\CoreBundle\Twig\WallabagExtension::removeWww