trim() публичный Метод

Trim whitespace at the beginning and end of a string
public trim ( string $string, string $charlist = null ) : string
$string string The string to trim
$charlist string List of characters that should be trimmed, defaults to whitespace
Результат string The trimmed string
 /**
  * @test
  * @dataProvider trimExamples
  */
 public function trimWorks($string, $charlist, $expected)
 {
     $helper = new StringHelper();
     $result = $helper->trim($string, $charlist);
     $this->assertSame($expected, $result);
 }