smarty template engine
Monday, October 13, 2008  
download | documentation | faq | forum | mailing lists | changelog | contribs 


search for in the  


count_characters

Подсчитывает количество символов в переменной.

Позиция параметраТипОбязателенПо умолчаниюОписание
1booleanНетfalseОпределяет, учитывать ли пробелы при подсчете.

Пример 5-4. count_characters

<?php

$smarty
->assign('articleTitle''Cold Wave Linked to Temperatures.');

?>

Шаблон:

{$articleTitle}
{$articleTitle|count_characters}
{$articleTitle|count_characters:true}

Результат обработки:

Cold Wave Linked to Temperatures.
29
33

См. также count_words, count_sentences и count_paragraphs.




 

credits 

Smarty Copyright © 2002-2008
New Digital Group, Inc.

All rights reserved.