public function PHPMailer::hasMultiBytes
Search API
5.x PHPMailer.php | public PHPMailer::hasMultiBytes($str) |
Check if a string contains multi-byte characters.
Parameters
string $str multi-byte text to wrap encode:
Return value
bool
1 call to PHPMailer::hasMultiBytes()
- PHPMailer::encodeHeader in inc/
PHPMailer/ src/ PHPMailer.php - Encode a header value (not including its label) optimally. Picks shortest of Q, B, or none. Result includes folding if needed. See RFC822 definitions for phrase, comment and text positions.
File
- inc/
PHPMailer/ src/ PHPMailer.php, line 3188
Class
- PHPMailer
- PHPMailer - PHP email creation and transport class.
Namespace
PHPMailer\PHPMailerCode
public function hasMultiBytes($str)
{
if (function_exists('mb_strlen')) {
return strlen($str) > mb_strlen($str, $this->CharSet);
}
// Assume no multibytes (we can't handle without mbstring functions anyway)
return false;
}