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



        
$code trim(fread($input1024));



        
shell_exec(sprintf('stty %s'$sttyMode));
    {

        
$width getenv('COLUMNS');

        if (
$width !== false) {

            return (int) 
trim($width);

        }



        if (
self::$width === null) {
    {

        
$height getenv('LINES');

        if (
$height !== false) {

            return (int) 
trim($height);

        }



        if (
self::$height === null) {
    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];