Write to the standard output device with an end of line.

@param string		$str
@return void
7648
public static function line( $str, $color = null, $background = null ) 
	{
		if ( is_array( $str ) ) 
		{
			$str = implode( PHP_EOL, $str );
		}
		
		static::write( $str.PHP_EOL, $color, $background );
	}
877604
public function send(string $str): void
    {
        if ($this->need_headers) {
            $this->sendHttpHeaders();
        }
        $this->need_headers = false;

        fwrite($this->opt->getOutputStream(), $str);
    }
294724
protected function outputConv(string $str): string
    {
        if ($str === '') {
            return '';
        }

        return \iconv('UTF-32', $this->encoding, static::$utf32Header . $str);
    }
1084250
private function _writeString($row, $col, $str, $xfIndex)
	{
		$this->_writeLabelSst($row, $col, $str, $xfIndex);
	}
349706
public function write(string $string, int $writer = Output::STANDARD): void
	{
		if($this->muted)
		{
			return;
		}

		$writer = $this->getWriter($writer);

		if($this->formatter !== null)
		{
			if($this->environment->hasAnsiSupport() === false || $writer->isDirect() === false)
			{
				$string = $this->formatter->stripTags($string);
			}

			$string = $this->formatter->format($string);
		}

		$writer->write($string);
	}
81109
def write(self, data, end="\n", flush=True):
        
        if not self.nostdout:
            self.stdout.write(data+end)
        if self.file is not None:
            self.file.write(data+end)
        if flush:
            self.flush()
837896
public function write(string $data) : void
    {
        $this->buffer .= $data;

        if (strlen($this->buffer) >= $this->size) {
            $this->flush();
        }
    }
821826
public function end($summary)
    {
        $this->_indent--;

        $this->write("\n\n");
        $this->_reportSkipped($summary);

        foreach ($summary->logs() as $log) {
            if (!$log->passed()) {
                $this->_report($log);
            }
        }

        $this->write("\n");
        $this->_reportSummary($summary);
    }
514453
public void write(Pointer _str, final int _len) {
        int len = _len;
        byte[] bstr = _str.buffer;
        int str = _str.start;

        if(this.buffer == null) {
            clear();
        }

        int at = this.marker;
        if(len + at >= this.bufsize - 1) {
            flush(0);
            for(;;) {
                int rest = (this.bufsize - 1) - this.marker;
                if(len <= rest) break;
                System.arraycopy(bstr, str, this.buffer, this.marker, rest);
                this.marker += rest;
                str += rest;
                len -= rest;
                flush(0);
            }
        }
        
        System.arraycopy(bstr, str, this.buffer, this.marker, len);
        this.marker += len;
        this.buffer[this.marker] = 0;
    }
323280
public function chunk($str = null)
	{
		if (false === $this->chunked)
		{
			$this->chunked = true;
			$this->header('Transfer-encoding', 'chunked');
			flush();
		}

		if (($body_length = strlen($this->body)) > 0)
		{
			printf("%x\r\n", $body_length);
			$this->sendBody();
			$this->setBody('');
			echo "\r\n";
			flush();
		}

		if (null !== $str)
		{
			printf("%x\r\n", strlen($str));
			echo "$str\r\n";
			flush();
		}

		return $this;
	}
845977
private function writeLine($text, $indent = 0)
    {
        $indent = strlen($text) + $indent;
        $format = '%'.$indent.'s';

        $this->reference .= sprintf($format, $text).PHP_EOL;
    }
381467
protected function write(string $data):void{
		$len = \strlen($data);

		for($i = 0; $i + 1 < $len; $i += 2){
			$c = ((0xff & \ord($data[$i])) << 8) | (0xff & \ord($data[$i + 1]));

			if(0x8140 <= $c && $c <= 0x9FFC){
				$c -= 0x8140;
			}
			elseif(0xE040 <= $c && $c <= 0xEBBF){
				$c -= 0xC140;
			}
			else{
				throw new QRCodeDataException('illegal char at '.($i + 1).' ['.$c.']');
			}

			$this->bitBuffer->put((($c >> 8) & 0xff) * 0xC0 + ($c & 0xff), 13);

		}

		if($i < $len){
			throw new QRCodeDataException('illegal char at '.($i + 1));
		}

	}
809808
protected function _fwrite($data, $length=null)
    {
        // We do not need to check if file position points to the end of "file".
        // Only append operation is supported now

        if ($length !== null) {
            $this->_data .= substr($data, 0, $length);
        } else {
            $this->_data .= $data;
        }

        $this->_position = strlen($this->_data);
    }
102226
public static function stringEndsWith($str, $postfix)
    {
        if(is_array($postfix)){
            foreach($postfix as $p){
                if($p === "" || substr($str, -strlen($p)) === $p){
                    return true;
                }
            }
            return false;
        }
        return $postfix === "" || substr($str, -strlen($postfix)) === $postfix;
    }
684125
public function end($str = '', $force = false) {
        // Find the task we are finishing.
        $task = array_pop($this->taskStack);
        if ($task !== null) {
            list($taskStr, $taskTimestamp, $taskOutput) = $task;
            $timespan = microtime(true) - $taskTimestamp;
        } else {
            trigger_error('Called LogFormatter::end() without calling LogFormatter::begin()', E_USER_NOTICE);
        }

        $pastMaxLevel = $this->currentLevel() > $this->getMaxLevel();
        if ($pastMaxLevel) {
            if ($force && isset($taskStr) && isset($taskOutput)) {
                if (!$taskOutput) {
                    // Output the full task string if it hasn't already been output.
                    $str = trim($taskStr.' '.$str);
                }
                if (!$this->isNewline) {
                    $this->write($this->getEol());
                    $this->isNewline = true;
                }
            } else {
                return $this;
            }
        }

        if (!empty($timespan) && $this->getShowDurations()) {
            $str = trim($str.' '.$this->formatString($this->formatDuration($timespan), ["\033[1;34m", "\033[0m"]));
        }

        if ($this->isNewline) {
            // Output the end message as a normal message.
            $this->message($str, $force);
        } else {
            // Output the end message on the same line.
            $this->write(' '.$str.$this->getEol());
            $this->isNewline = true;
        }

        return $this;
    }
1107112
public static function stderr($text, $nl = true, $quit = -200): void
    {
        self::write($text, $nl, $quit, [
            'stream' => \STDERR,
        ]);
    }
1123286
protected void writeString(OutputStream out, String str) throws IOException {
        if (str == null) {
            writeInt(out, -1);
        } else if (str.isEmpty()) {
            writeInt(out, 0);
        } else {
            byte[] bs = StringSerializer.encode(str);
            writeInt(out, bs.length);
            out.write(bs);
        }
    }