$string = 'prefixRest'; $withoutPrefix = Strings::removePrefixes($string, array('pre', 'fix'));
Rest
/** * @test */ public function shouldRemovePrefixes() { //given $string = 'prefixRest'; //when $withoutPrefix = Strings::removePrefixes($string, array('pre', 'fix')); //then $this->assertEquals('Rest', $withoutPrefix); }