(programmed for EE 1.6.8)
This is a simple useless/ful plugin that makes use of PHP’s Multibyte String Function Library.
We generally use it to handle string case conversions within templates.
Currently, it supports 4 modification functions (mb_strtolower, mb_strtoupper, and multibyte modified versions of ucfirst and lcfirst referred respectively as mb_ucfirst and mb_lcfirst) and mb_strlen function.
You can download the plugin here.
Simply extract the pi.mb_string.php into your EE plugin folder.
There are two parameters accepted:
1- function mb_strtolower, mb_strtoupper, mb_ucfirst, mb_lcfirst, mb_strlen
2- encoding Accepts File encoding names such as utf-8. You can check PHP manual for more details.
*** EXAMPLES ***
{exp:mb_string function="mb_strtolower" encoding="utf-8"}
HELLO
{/exp:mb_string}Result: hello
{exp:mb_string function="mb_strtoupper" encoding="utf-8"}
HelLO
{/exp:mb_string}Result: HELLO
{exp:mb_string function="mb_lcfirst" encoding="utf-8"}
HelLO
{/exp:mb_string}Result: helLO
{exp:mb_string function="mb_ucfirst" encoding="utf-8"}
hello
{/exp:mb_string}Result: Hello
{exp:mb_string function="mb_ucfirst" encoding="utf-8"}
hello
{/exp:mb_string}Result: 5
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.