Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Strip whitespace (or other characters) from the end of a string
Alias chop
<?php rtrim(string $string, string $characters = " \n\r\t\v\x00"): string
<?php         $this->throwError(

            $phpcsFile,

            $stackPtr,

            \rtrim($contents, "\r\n") . GetTokensAsString::compact($phpcsFile, $stackPtr, $i, true)

        );

    }
<?php             case \T_OPEN_TAG_WITH_ECHO:


                if (\rtrim($contents) === '<?=') {

                    $error = true;

                }

                break;
<?php                 $afterMarker = \ltrim($afterMarker, ';');


                $afterMarker = \rtrim($afterMarker, "\r\n");



                if ($afterMarker !== '') {

                    $phpcsFile->addError($trailingError, $i, $trailingErrorCode);