Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

Replacing strings

$
0
0
Hello, its me again..

I use this lib: https://github.com/oscar-broman/strl...ter/strlib.inc
(from Y_Less)

and made this function:

Code:

stock encryptDecrypt(data[])
{
        new search[] = {"a", "b", "c"};
        new replace[] = {"d", "e", "f"};
        strreplace(data, search, replace, true, 0, -1, strlen(data));
        return data;
}

Basically, this function should replace all chars from the search array to the chars from replace array.

Code:

encryptDecrypt("abc")
But the output still is abc.

Whats wrong?

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>