ID:               43431
 Updated by:       [EMAIL PROTECTED]
 Reported By:      lowell at ietech dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Strings related
 Operating System: Linux data 2.6.18.2-34
 PHP Version:      5.2.5
 New Comment:

Are you sure you're using the right function now?

string ltrim  ( string $str  [, string $charlist])

What you think is 'needle' is actually list of characters to remove.
It's not str_replace()..


Previous Comments:
------------------------------------------------------------------------

[2007-11-27 18:51:41] lowell at ietech dot com

Description:
------------
Using '/H' (uppercase 'H' is relevant) near the end of the haystack
truncates the result (In example below, first 5 letters of 'Health'). 
Have tried many strings to determine consistency, but have failed. 
Using '/home' instead of '/Home' in string produced a different result,
but any other attempts at increasing or decreasing the # '/H's in the
string failed to reveal a consistent behavior.

Reproduce code:
---------------
$sHayStack = "/data/virtual/abc.com/Home/test/absolute/Health";
$sNeedle = "/data/virtual/abc.com/Home/test/absolute";
echo ltrim( $sHayStack, $sNeedle );


Expected result:
----------------
Health

Actual result:
--------------
h


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=43431&edit=1

Reply via email to