RegEx Type Function?
Do you have any idea on how I would go about making a function that would cut up a string and divide it up based on separation characters? I could take one I found out of someone's plugin but that is petty theft and completely wrong in my book.
This is a simple explanation on how it should work. Say I send in a string with this infomation in it. - "Steam:Blah1|Steam:Blah2|Steam:Blah3"I would specify that the | character is the separation character. Then it would cut the string up and return this: Code:
sc_output[0] = "Steam:Blah1"Edit: The person or people who help will be in the credits of the plugin I just started. |
Re: RegEx Type Function?
Quote:
All plugins are under GPL. You can use any of it as long as you give them credit. It not stealing. This is a open source community. |
Re: RegEx Type Function?
Still, I just couldn't bring myself to copy from someone. Call me whatever you want. Its just how I am. :P
|
Re: RegEx Type Function?
Maybe Pawn Have Split function??
|
Re: RegEx Type Function?
Either use regex (overkill) or use the parse or strbreak functions.
|
Re: RegEx Type Function?
I know how to use parse but I don't think it will let me put it into a loop and break down the string until its all broken down. I don't know how to use strbreak at all.
|
Re: RegEx Type Function?
There is a function made specifically for this purpose, called strtok().
|
Re: RegEx Type Function?
Do you think this is a good way of doing it?
Code:
|
Re: RegEx Type Function?
FYI, still not good enough.
Code:
|
| All times are GMT -4. The time now is 22:23. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.