AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Replace all double, and many letters. (https://forums.alliedmods.net/showthread.php?t=133612)

Emp0wer 07-27-2010 05:24

Replace all double, and many letters.
 
I need case insensitive function, that would
make f.e.:
string wooooOooorrrrLlD -> world
I wanna to do that in anti swear system. Because many ppl. Just write not fuck, fuuck and so they are not get busted.

A have just a part of code and I can't find out how to do next:
PHP Code:

replace_same(const str,len)
{
    for(new 
i=1;i<=len;i++)
    {
        if(
equali(str[i],str[i-1]))
        {
            
//how to do next?
        
}
    }



Emp0wer 07-27-2010 10:47

Re: Replace all double, and many letters.
 
Help me please

Arkshine 07-27-2010 11:14

Re: Replace all double, and many letters.
 
You would need to use Regex module. Don't ask how. Search. It's powerful and for an anti swear system plugin, it should be used.

string wooooOooorrrrLlD -> world How you can except such function would exist ? Anyway to convert in lower cases, you have already natives http://www.amxmodx.org/funcwiki.php?go=inc&id=5

Emp0wer 07-27-2010 13:34

Re: Replace all double, and many letters.
 
Quote:

Originally Posted by Arkshine (Post 1253133)
You would need to use Regex module. Don't ask how. Search. It's powerful and for an anti swear system plugin, it should be used.

string wooooOooorrrrLlD -> world How you can except such function would exist ? Anyway to convert in lower cases, you have already natives http://www.amxmodx.org/funcwiki.php?go=inc&id=5

http://www.amxmodx.org/funcwiki.php?go=inc&id=5 there is no such a function

YamiKaitou 07-27-2010 13:36

Re: Replace all double, and many letters.
 
He is telling you to search...

Emp0wer 07-27-2010 14:03

Re: Replace all double, and many letters.
 
Quote:

Originally Posted by YamiKaitou (Post 1253229)
He is telling you to search...

I was searching but nothing =(

Arkshine 07-27-2010 14:25

Re: Replace all double, and many letters.
 
Are you idiot ?

tm. 07-27-2010 14:28

Re: Replace all double, and many letters.
 
http://www.amxmodx.org/funcwiki.php?go=func&id=60

Emp0wer 07-27-2010 16:04

Re: Replace all double, and many letters.
 
Quote:

Originally Posted by Arkshine (Post 1253286)
Are you idiot ?

How scary you are, real arnold schwarzenegger :mrgreen: Sorry man, please don't beat me :mrgreen::mrgreen:


All times are GMT -4. The time now is 00:06.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.