function Markdown_Parser::_initDetab in Markdown 6
Same name and namespace in other branches
- 5 markdown.php \Markdown_Parser::_initDetab()
1 call to Markdown_Parser::_initDetab()
File
- ./
markdown.php, line 1664
Class
Code
function _initDetab() {
#
# Check for the availability of the function in the `utf8_strlen` property
# (initially `mb_strlen`). If the function is not available, create a
# function that will loosely count the number of UTF-8 characters with a
# regular expression.
#
if (function_exists($this->utf8_strlen)) {
return;
}
$this->utf8_strlen = create_function('$text', 'return preg_match_all(
"/[\\\\x00-\\\\xBF]|[\\\\xC0-\\\\xFF][\\\\x80-\\\\xBF]*/",
$text, $m);');
}