This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function removeTrailingWhitespace(string $string) : string | |
| { | |
| return preg_replace('/[ \t]+(\r?)$/m', '$1', $string); | |
| } | |
| // PHPUnit testcase for method | |
| // public function testTestInternalRemoveTrailingWhitespace() | |
| // { | |
| // $this->assertSame( | |
| // "\n some\r\n string\n\n\r\nto remove trailing\n whitespace from.\n\n", |
OlderNewer