Raised This Month: $51 Target: $400
 12% 

Help with parse


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pacheco
Senior Member
Join Date: Jul 2011
Old 12-29-2013 , 13:18   Help with parse
Reply With Quote #1

I want to parse string with one way that parse string with space, look

Code:
string = "pacheco alliedmodders 100 200" // Name, Number, Number
parse(string, sz1, charsmax(sz1), sz2, charsmax(sz2), sz3, charsmax(sz3))
I need sz1 = "pacheco alliedmodders", sz2 = "100", sz3 = "200" how to ?

(I know sz1 will be only "pacheco", sz2 only "alliedmodders" and sz3 "100")
__________________



pacheco is offline
akcaliberg
Senior Member
Join Date: Nov 2011
Location: Istanbul
Old 12-29-2013 , 16:56   Re: Help with parse
Reply With Quote #2

Quote:
Originally Posted by pacheco View Post
(I know sz1 will be only "pacheco", sz2 only "alliedmodders" and sz3 "100")
Why don't you simply combine the sz1 and the sz2 ?
akcaliberg is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-29-2013 , 18:43   Re: Help with parse
Reply With Quote #3

If the intended source of the string is a file or from a command, just put quotes around the parts you want in a single variable.
__________________
fysiks is offline
pacheco
Senior Member
Join Date: Jul 2011
Old 12-30-2013 , 20:07   Re: Help with parse
Reply With Quote #4

Quote:
Why don't you simply combine the sz1 and the sz2 ?
I can't, because it's a nfvault file, and it can have space or can't have space too. Thanks.

Quote:
If the intended source of the string is a file or from a command, just put quotes around the parts you want in a single variable.
I thought quotes wouldn't work.. but for now it's ok. Thanks.
__________________




Last edited by pacheco; 12-30-2013 at 20:08.
pacheco is offline
Reply



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


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