36 $this->_charStream = $charStream;
50 $lines = array(); $lineCount = 0;
52 $currentLine =& $lines[$lineCount++];
54 if (0 >= $maxLineLength)
59 $this->_charStream->flushContents();
60 $this->_charStream->importString($string);
62 $thisLineLength = $maxLineLength - $firstLineOffset;
64 while (
false !== $char = $this->_charStream->read(4))
66 $encodedChar = rawurlencode($char);
67 if (0 != strlen($currentLine)
68 && strlen($currentLine . $encodedChar) > $thisLineLength)
71 $currentLine =& $lines[$lineCount++];
72 $thisLineLength = $maxLineLength;
74 $currentLine .= $encodedChar;
77 return implode(
"\r\n", $lines);
86 $this->_charStream->setCharacterSet($charset);