From 45f4e6c4f64221e93d0e52df7e5b7ddb30c045eb Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Sat, 17 Jan 2015 21:56:32 +0300 Subject: [PATCH] Fix ucfirst/lcfirst implementations --- template.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template.php b/template.php index 481c636..404b52a 100644 --- a/template.php +++ b/template.php @@ -621,13 +621,13 @@ class VMXTemplate // UTF-8 lcfirst() static function mb_lcfirst($str) { - return mb_strtolower(mb_substr($str, 0, 1)) . mb_substr($str, 0, 1); + return mb_strtolower(mb_substr($str, 0, 1)) . mb_substr($str, 1); } // UTF-8 ucfirst() static function mb_ucfirst($str) { - return mb_strtoupper(mb_substr($str, 0, 1)) . mb_substr($str, 0, 1); + return mb_strtoupper(mb_substr($str, 0, 1)) . mb_substr($str, 1); } // Replace tags with whitespace