Copyright © OXID eSales AG. All rights reserved. See LICENSE file for license details.This method replaces existing Smarty function for truncating strings (check Smarty documentation for details). When truncating strings additionally we need to convert '/" entities to '/" and after truncating convert them back.
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.
- Parameters
-
string | $sString | String to truncate |
integer | $iLength | To length |
string | $sSufix | Truncation mark |
bool | $blBreakWords | break words |
bool | $middle | middle ? |
- Returns
- string