Quote:
Originally Posted by Y_Leѕѕ
pawn Код:
/* (DEPRECIATED) chr_explode: Creates an array of values from 'sSource', where only the exact amount of values matching sizeof(aExplode) are returned. */
pawn-lang.pdf is a wonderful thing:
Quote:
#pragma deprecated value
The subsequent symbol is flagged as “deprecated”. If a script uses it, the parser issues a warning.
|
However if this is a first release and that function is already deprecated - why include it in the first place? Also, there's a difference between "depreciated", which you used and "deprecated", which is the correct word here.
|
I forgot about that directive. I haven't used it in such a long time, it escaped my mind. And it is the second release, but I decided to keep it in there. Because I use the word 'depreciation' a lot when talking about other words, 'i' tends to creep into there. Bla bla. I'll go ahead and fix/optimise it now.
_________________________________________________
Quote:
Originally Posted by Dabombber
...
|
Sorry for the late reply to that particular post.
pawn Код:
main()
{
print(str_replace("dog", "cat", "dog dog dog dog"));
// Returns: cat cat cat dog
}
You're right, the last match doesn't get replaced. I fixed it with adding + 1 to a variable.