API - XOOPS 2.5.11 Beta 2
By monxoops.fr
modifier.truncate.php File Reference

Namespaces

namespace  Smarty
 

Functions

 smarty_modifier_truncate ($string, $length=80, $etc='…', $break_words=false, $middle=false)
 

Function Documentation

◆ smarty_modifier_truncate()

smarty_modifier_truncate (   $string,
  $length = 80,
  $etc = '…',
  $break_words = false,
  $middle = false 
)

Smarty truncate modifier plugin

Type: modifier
Name: truncate
Purpose: Truncate a string to a certain length if necessary, optionally splitting in the middle of a word, and appending the $etc string or inserting $etc into the middle. truncate (Smarty online manual) https://www.guyrutenberg.com/2007/12/04/multibyte-string-truncate-modifier-for-smarty-mb_truncate/ Guy Rutenberg guyru.nosp@m.tenb.nosp@m.erg@g.nosp@m.mail.nosp@m..com based on the original truncate by Monte Ohrt <monte at ohrt dot com> string integer string boolean boolean string