Raised This Month: $ Target: $400
 0% 

Solved contain & containi


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Relaxing
AlliedModders Donor
Join Date: Jun 2016
Location: White Plains
Old 12-19-2017 , 12:18   contain & containi
Reply With Quote #1

Can somebody give me more details about containi? I cannot understand it properly.
The code isn't helping me to much(craziness)
PHP Code:
static cell AMX_NATIVE_CALL contain(AMX *amxcell *params/* 2 param */
{
    
register cell *get_amxaddr(amxparams[2]);
    
register cell *get_amxaddr(amxparams[1]);
    
register cell *b;
    
cellstr b;
    
cellsubstr a;
    
    while (*
c)
    {
        if (*
== *a)
        {
            
c++;
            if (!*++
a)
                return 
str;
        } else {
            
= ++b;
            
substr;
        }
    }
    
    return -
1;
}

static 
cell AMX_NATIVE_CALL containi(AMX *amxcell *params/* 2 param */
{
    
register cell *get_amxaddr(amxparams[2]);
    
register cell *get_amxaddr(amxparams[1]);
    
register cell *b;
    
cellstr b;
    
cellsubstr a;
    
    while (*
c)
    {
        if (
tolower(*c) == tolower(*a))
        {
            
c++;
            if (!*++
a)
                return 
str;
        } else {
            
= ++b;
            
substr;
        }
    }
    
    return -
1;

__________________

Last edited by Relaxing; 12-20-2017 at 00:53.
Relaxing is offline
 



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 22:40.


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