forked from umakantp/jsmart
-
Notifications
You must be signed in to change notification settings - Fork 2
count_sentences
pfaciana edited this page Sep 25, 2019
·
1 revision
Used to count the number of sentences in a variable. A sentence being delimited by a dot, question- or exclamation-mark (.?!).
Template:
{$articleTitle = 'Two Soviet Ships Collide - One Dies. Enraged Cow Injures Farmer with Axe.'}
{$articleTitle}
{$articleTitle|count_sentences}output:
Two Soviet Ships Collide - One Dies. Enraged Cow Injures Farmer with Axe.
2
see also count_sentences in PHP Smarty documentation.