Strings and pattern matching

BlitzMax Forums/BlitzMax Beginners Area/Strings and pattern matching

johnnyfreak(Posted 2008) [#1]
Is there some function in BMax to manipulate strings like "scanf" function of C?

Or

Is there something similar to the pattern matching of OcaML?

the prblem is:

if i have a string "if(condition)then commands else commands endif",
how can i get an array with [condition, commands, commands] strings?

something like

mystring.isLike("if(*)then*else*endif") returning a string array with "*" strings?

or something like

match mystring with:
| if(b)then c else c2 -> [b, c, c2]

?


degac(Posted 2008) [#2]
a simple code



johnnyfreak(Posted 2008) [#3]
great!

so i can use string as arrays!

very good