21.08.2009, 05:40
Quote:
Originally Posted by /^We(stie|z+[e|a
r)$/ ]
Testing str_replace() I used my str_replace() function, and compared it to the one that is in dUtils, as well as the one found from here (Dabombber): Код:
str_replace(): 0266, dutils_strreplace(): 7125, dabombber_strreplace(): 0516 str_replace(): 0266, dutils_strreplace(): 6625, dabomber_strreplace(): 0484 str_replace(): 0266, dutils_strreplace(): 6328, dabomber_strreplace(): 0500 str_replace(): 0282, dutils_strreplace(): 6078, dabomber_strreplace(): 0515 str_replace(): 0266, dutils_strreplace(): 6703, dabomber_strreplace(): 0500 |
[code=pawn]str_replace("dog", "cat", "The quick brown fox jumps over the lazy dog")[/code]
doesn't replace and
[code=pawn]strins(sReturn, sReplace, iIndex, iLengthReplace);[/code]
should be
[code=pawn]strins(sReturn, sReplace, iIndex, sizeof(sReturn));[/code]
not that it really matters since strins doesn't seem to do any bounds checking