function CharacterStream::write
1 call to CharacterStream::write()
- CharacterStream::__construct in vendor/
symfony/ mime/ CharacterStream.php
File
-
vendor/
symfony/ mime/ CharacterStream.php, line 152
Class
- CharacterStream
- @author Fabien Potencier <fabien@symfony.com> @author Xavier De Cock <xdecock@gmail.com>
Namespace
Symfony\Component\MimeCode
public function write(string $chars) : void {
$ignored = '';
$this->data .= $chars;
if ($this->fixedWidth > 0) {
$strlen = \strlen($chars);
$ignoredL = $strlen % $this->fixedWidth;
$ignored = $ignoredL ? substr($chars, -$ignoredL) : '';
$this->charCount += ($strlen - $ignoredL) / $this->fixedWidth;
}
else {
$this->charCount += $this->getUtf8CharPositions($chars, $this->dataSize, $ignored);
}
$this->dataSize = \strlen($this->data) - \strlen($ignored);
}