From: Dmitry Stogov Date: Mon, 22 Aug 2005 14:14:10 +0000 (+0000) Subject: Fixed unicode support for ltrim() X-Git-Tag: PRE_NEW_OCI8_EXTENSION~129 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e404ee456b8c0e0ad88dfc8f05c02e14e0b4ce51;p=php Fixed unicode support for ltrim() --- diff --git a/ext/standard/string.c b/ext/standard/string.c index 2dc60ddbb8..66485824c8 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -715,6 +715,8 @@ static UChar *php_u_trim(UChar *c, int32_t len, UChar *what, int32_t what_len, z } } end = i; + } else { + --end; } if ( start < len ) {