String tokenizer
BlitzMax Forums/BlitzMax Programming/String tokenizer
| ||
Hi, I have written a simple tokenizer for BlitzMax (like the one in java). For example, you can separate the string "Hello/Blitz/Max" into 3 parts if you use the delimiter "/". That's useful in many cases. Please run the code to see some examples of use. Please tell me if you find this useful. I plan to add some other useful string library like this one if people are interested. (By the way, that's my first BlitzMax program!) |
| ||
Nice! |
| ||
cool, I wrote one a while ago (in an attempt to create basic scripting), it isn't perfect though. ( http://www.blitzbasic.com/Community/posts.php?topic=42270#473596 ) |
| ||
You could also make a sort of lex thing where your function reads from a string or even a stream and looks for patterns, and when it does it you could have it do something. |
| ||
thx |
| ||
I will create more useful text functions as a library. I have plenty of useful one coming from Cod2Doc. I just have to port them to BlitzMax! @Rich05: what do you mean by lex? Could you give me an example of what you mean? |