MB_SUBSTR


Function is needed for obtaining of multibyte (UTF-8) substring or replacing the part of the string. Function assumes upon the entrance 2, of 3 or 4 arguments. First argument - string, whose part it is nessesary to obtain, second argument - start position, third argument - count of symbols, fourth argument - string to replace.
Example of function call:
<TMPL_var MB_SUBSTR('foobar', 2)>: oobar
<TMPL_var MB_SUBSTR('foobar', 2, 3)>: oba
<TMPL_var MB_SUBSTR('foobar', 2, 3, '1234')>: fo1234r

Copyright © 2003 - 2010 CTPP Dev. Team | http://ctpp.havoc.ru