LE
LE = "\n"
Конец
Класс помощник для всяких операций с строками
UTF8CharBoundary(string $encodedText, integer $maxLength) : integer
Finds last character boundary prior to maxLength in a utf-8 quoted (printable) encoded string.
Original written by Colin Brown.
| string | $encodedText | utf-8 QP text |
| integer | $maxLength | find last character boundary prior to this length |
WrapText(string $message, string $length, string $charset, boolean $qp_mode = false) : string
Wraps message for use with mailers that do not automatically perform wrapping and for quoted-printable.
Original written by philippe.
| string | $message | |
| string | $length | |
| string | $charset | |
| boolean | $qp_mode |
Base64EncodeWrapMB(string $str, string $charset) : string
Correctly encodes and wraps long multibyte strings for mail headers without breaking lines within a character.
Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php
| string | $str | multi-byte text to wrap encode |
| string | $charset | charset |
EncodeQPphp(string $input = '', integer $line_max = 76, boolean $space_conv = false) : string
Encode string to quoted-printable.
Only uses standard PHP, slow, but will always work
| string | $input | the text to encode |
| integer | $line_max | Number of chars allowed on a line before wrapping |
| boolean | $space_conv |
EncodeQP(string $string, integer $line_max = 76, boolean $space_conv = false) : string
Encode string to RFC2045 (6.7) quoted-printable format Uses a PHP5 stream filter to do the encoding about 64x faster than the old version Also results in same content as you started with after decoding
| string | $string | the text to encode |
| integer | $line_max | Number of chars allowed on a line before wrapping |
| boolean | $space_conv | Dummy param for compatibility with existing EncodeQP function |
EncodeString(string $str, string $encoding = 'base64') : string
Encodes string to requested format.
Returns an empty string on failure.
| string | $str | The text to encode |
| string | $encoding | The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' |
EncodeFile(string $path, string $encoding = 'base64') : string
Encodes attachment in requested format.
Returns an empty string on failure.
| string | $path | The full path to the file |
| string | $encoding | The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' |