Raised This Month: $ Target: $400
 0% 

parse string from aymbols


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
c2d22
Junior Member
Join Date: Feb 2013
Location: Albania
Old 05-25-2014 , 10:39   Re: parse string from aymbols
Reply With Quote #2

You need to use , strtok .

For ur example , if

PHP Code:
new format[512] = "12+steam_0:0:24524"
new id[20] , authid[25]
strtok(format,id,charsmax(id),authid,charsmax(authid),'+')
log_amx("Id - %s  and authid - %s",id,authid
Output
PHP Code:
Id 12 and authid steam_0:0:24524 
If u want to trim both the divided part use strtok2 , because trimming is broken in strtok .

Last edited by c2d22; 05-25-2014 at 10:42.
c2d22 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 09:43.


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