Raised This Month: $ Target: $400
 0% 

Replace all double, and many letters.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 07-27-2010 , 05:24   Replace all double, and many letters.
Reply With Quote #1

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?
        
}
    }


Last edited by Emp0wer; 07-27-2010 at 06:45.
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 07-27-2010 , 10:47   Re: Replace all double, and many letters.
Reply With Quote #2

Help me please
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-27-2010 , 11:14   Re: Replace all double, and many letters.
Reply With Quote #3

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
__________________
Arkshine is offline
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 07-27-2010 , 13:34   Re: Replace all double, and many letters.
Reply With Quote #4

Quote:
Originally Posted by Arkshine View Post
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
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 07-27-2010 , 13:36   Re: Replace all double, and many letters.
Reply With Quote #5

He is telling you to search...
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 07-27-2010 , 14:03   Re: Replace all double, and many letters.
Reply With Quote #6

Quote:
Originally Posted by YamiKaitou View Post
He is telling you to search...
I was searching but nothing =(
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-27-2010 , 14:25   Re: Replace all double, and many letters.
Reply With Quote #7

Are you idiot ?
__________________
Arkshine is offline
tm.
Member
Join Date: Apr 2010
Old 07-27-2010 , 14:28   Re: Replace all double, and many letters.
Reply With Quote #8

http://www.amxmodx.org/funcwiki.php?go=func&id=60
tm. is offline
Emp0wer
Member
Join Date: Jul 2010
Location: Ukraine mother
Old 07-27-2010 , 16:04   Re: Replace all double, and many letters.
Reply With Quote #9

Quote:
Originally Posted by Arkshine View Post
Are you idiot ?
How scary you are, real arnold schwarzenegger Sorry man, please don't beat me

Last edited by Emp0wer; 07-27-2010 at 16:59.
Emp0wer is offline
Send a message via ICQ to Emp0wer Send a message via Skype™ to Emp0wer
Old 07-28-2010, 07:53
DaxProxy
This message has been deleted by DaxProxy. Reason: First i need to learn reading the full thread before "helping"...
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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