Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Strip whitespace (or other characters) from the beginning and end of a string
<?php trim(string $string, string $characters = " \n\r\t\v\x00"): string
<?php         @fwrite($input, terminal()->getCsi() . '6n');



        $code = trim(fread($input, 1024));



        shell_exec(sprintf('stty %s', $sttyMode));
<?php     {

        $width = getenv('COLUMNS');

        if ($width !== false) {

            return (int) trim($width);

        }



        if (self::$width === null) {
<?php     {

        $height = getenv('LINES');

        if ($height !== false) {

            return (int) trim($height);

        }



        if (self::$height === null) {
<?php     private function initDimensions(): void

    {

        if (DIRECTORY_SEPARATOR === '\\') {

            if (preg_match('/^(\d+)x(\d+)(?: \((\d+)x(\d+)\))?$/', trim(getenv('ANSICON')), $matches)) {



                self::$width  = (int) $matches[1];