removePrefixes() public static method

Example: $string = 'prefixRest'; $withoutPrefix = Strings::removePrefixes($string, array('pre', 'fix')); Result: Rest
public static removePrefixes ( string $string, array $prefixes ) : mixed
$string string
$prefixes array
return mixed
示例#1
0
 /**
  * @test
  */
 public function shouldRemovePrefixes()
 {
     //given
     $string = 'prefixRest';
     //when
     $withoutPrefix = Strings::removePrefixes($string, array('pre', 'fix'));
     //then
     $this->assertEquals('Rest', $withoutPrefix);
 }