Posted By
|
Message
|
Cazra Crazy?
Registered 24/07/2002
Points 4472
|
6th April, 2004 at 06:36:59 -
I'm using string parser to check what each letter is in a string.
Here's the code I've got:
:::group "run":::
>always
-set source string to string$("string")
-change alterable string of "string" to ( midstr$( "String Parser", value( "position" ), value( "position" ) ))
>if string = "a"
-change alterable string of "string 2" to ( string$(string$("string 2"))+"moo")
>always
-add 1 to position
>if position > length("String parser")
-deactivate group "run"
:::end group "run"
I'm assuming that the correct sytax for midstring is( midstr$( "String Parser", >minimum value< , >maximumvalue< )) and it finds all characters within the minum and maximum values. Is this right?
n/a
|
cake
Registered 13/12/2002
Points 1173
|
6th April, 2004 at 06:59:14 -
Actually it is midstr$( "String Parser", <starting position>, <length of midstring>
have a fiddle, i know that MMF's built in one is that format anyway.
But if so, for what you want to do, you will want a midstring length of 1.
n/a
|
Cazra Crazy?
Registered 24/07/2002
Points 4472
|
6th April, 2004 at 07:02:22 -
awesome. thanks a bunch. I'd better write this down so I don't forget next time.
n/a
|
|
|