I was trying to achieve stripping off some beginning part from a string using php ltrim function. It works fine until it get a i character after colon : . if it find i after colon it simply ignore the i character. I know it can be done with substr or any other way but I want to know why its happening with trim. For example.
ltrim('mailto:bob@example.com','mailto:');
the above function will return bob@example.com
but if I put i after colon.. for example
ltrim('mailto:info@example.com','mailto:');
this one will return nfo@example.com
Can anybody explain what is happening?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…