Quote:
talking to someone about it earlier, was fun to try out he he
PHP Code:
function onCreated() {
temp.chat = "Hello you ****ing queer ****!";
temp.illegal = {"****ing", "queer", "****"};
temp.token = chat.tokenize();
temp.len = null;
temp.res = "";
for (temp.i: token) {
if (i in illegal) {
for (len = 0; len < i.length(); len++)
res @= randomstring("$", "£", "#");
} else
for (temp.c: illegal) {
if (i.starts(c)) {
for (len = i.charat(c); len < c.length(); len++)
res @= randomstring("$", "£", "#");
res @= i.substring(c.length());
}
}
if (len == null)
res @= i;
temp.output @= res.trim() @ " ";
res = "";
len = null;
}
echo(output);
}
|
Looks good, but I highly suggest you not use the Euro sign ... its not supported on some machines.