1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-20 13:21:54 +02:00

Fix typos in utf-8 uSubStr

This commit is contained in:
e107steved
2009-10-30 22:51:52 +00:00
parent 1a2c7e0ff8
commit 8d0127e8c9

View File

@@ -9,9 +9,9 @@
* Text processing and parsing functions * Text processing and parsing functions
* *
* $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $ * $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
* $Revision: 1.75 $ * $Revision: 1.76 $
* $Date: 2009-10-30 22:19:56 $ * $Date: 2009-10-30 22:51:52 $
* $Author: marj_nl_fr $ * $Author: e107steved $
* *
*/ */
if (!defined('e107_INIT')) { exit(); } if (!defined('e107_INIT')) { exit(); }
@@ -394,16 +394,15 @@ class e_parse
{ {
switch ($this->utfAction) switch ($this->utfAction)
{ {
case 0: case 0 : return substr($str, $start, $length);
return strrpos($str, $start, $length);
case 1 : case 1 :
if (is_null($length)) if (is_null($length))
{ {
return mb_strrpos($haystack, $needle); return mb_substr($haystack, $needle);
} }
else else
{ {
return mb_strrpos($haystack, $needle, $offset); return mb_substr($haystack, $needle, $offset);
} }
} }
utf8_substr($str, $start, $length); utf8_substr($str, $start, $length);