Lines Matching refs:length
38 …function twig_truncate_filter(Twig_Environment $env, $value, $length = 30, $preserve = false, $sep… argument
40 if (mb_strlen($value, $env->getCharset()) > $length) {
43 if (false === ($breakpoint = mb_strpos($value, ' ', $length, $env->getCharset()))) {
47 $length = $breakpoint;
50 return rtrim(mb_substr($value, 0, $length, $env->getCharset())).$separator;
56 …function twig_wordwrap_filter(Twig_Environment $env, $value, $length = 80, $separator = "\n", $pre… argument
67 while (!$preserve && mb_strlen($piece, $env->getCharset()) > $length) {
68 $sentences[] = mb_substr($piece, 0, $length, $env->getCharset());
69 $piece = mb_substr($piece, $length, 2048, $env->getCharset());
78 …function twig_truncate_filter(Twig_Environment $env, $value, $length = 30, $preserve = false, $sep… argument
80 if (strlen($value) > $length) {
82 if (false !== ($breakpoint = strpos($value, ' ', $length))) {
83 $length = $breakpoint;
87 return rtrim(substr($value, 0, $length)).$separator;
93 …function twig_wordwrap_filter(Twig_Environment $env, $value, $length = 80, $separator = "\n", $pre… argument
95 return wordwrap($value, $length, $separator, !$preserve);