Bugfix: Incorrect behavior of the "truncate" function in some circumstances:
Bugfix: Incorrect behavior of the "truncate" function in some circumstances:

If the first word from $string was longer than $length characters, then the regular expression had not truncated the string at all (for example, a string with a total length of 2000 characters was displayed without any cut, but with the $replace string at the end).

This bug has been reported by Markus Hackspacher (https://github.com/MarkusHackspacher).

Nerdmind/Blog,Nerdmind/Blog