Raised This Month: $ Target: $400
 0% 

Parsing strings with variable length


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-04-2009 , 23:53   Re: Parsing strings with variable length
Reply With Quote #3

Here's a way you can do it without using copy or the name & number string variables.
PHP Code:
new szString96 ] = "the user name 5000"
new 
iLen strlenszString ) , iPos;
    
for( 
iPos iLen 1iPos >= 0iPos-- )
{
    if( 
szStringiPos ] == ' ' 
    {
        
szStringiPos ] = EOS;
        break;
    }
}

server_print"^"%s^" ^"%s^"" szString szStringiPos ] ); 
__________________

Last edited by Bugsy; 11-04-2009 at 23:55.
Bugsy 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 23:37.


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