public static function trim($value, $extendMode = false): string
    {
        $result = (string)trim($value);

        if ($extendMode) {
            $result = trim($result, chr(0xE3) . chr(0x80) . chr(0x80));
            $result = trim($result, chr(0xC2) . chr(0xA0));
            $result = trim($result);
        }

        return $result;
    }
public static function trim($value, $extendMode = false): string
    {
        $result = (string)trim($value);

        if ($extendMode) {
            $result = trim($result, chr(0xE3) . chr(0x80) . chr(0x80));
            $result = trim($result, chr(0xC2) . chr(0xA0));
            $result = trim($result);
        }

        return $result;
    }
public static function trim ( $ value , $ extendMode = false ) : string { $ result = ( string ) trim ( $ value ) ; if ( $ extendMode ) { $ result = trim ( $ result , chr ( 0xE3 ) . chr ( 0x80 ) . chr ( 0x80 ) ) ; $ result = trim ( $ result , chr ( 0xC2 ) . chr ( 0xA0 ) ) ; $ result = trim ( $ result ) ; } return $ result ; }
Trim whitespaces and other special chars

@param string $value
@param bool   $extendMode
@return string
Trim whitespaces and other special chars