Page 1 of 1

StrParse

PostPosted: Wed Apr 15, 2015 1:53 am
by TinTin
Think I may have found a bug, just tried using "," delimiter ... am assuming it's the same API as Neobook for results
[ParsedStr1] [ParsedStr2] etc

Any work around?

Cheers

Re: StrParse

PostPosted: Wed Apr 15, 2015 4:55 am
by Gaev
TinTin:

Code: Select all
SetVar "[Fruit]" "Apple,Banana,Cherry"
StrParse "[Fruit]" "," [ParsedFruit]
AlertBox "ParsedFruit" "[ParsedFruit(1)]" ""

... will display "Banana" ... array elements in NeoAppBuilder start at Zero (for compatibility with Javascript and other (geek) languages).

You can also do this ...
Code: Select all
SetVar "[FruitIndex]" 1
SetVar "[Fruit]" "Apple,Banana,Cherry"
StrParse "[Fruit]" "," [ParsedFruit]
SetVar "[FruitIndex]" 1
AlertBox "ParsedFruit" "[ParsedFruit([FruitIndex])]" ""

Re: StrParse

PostPosted: Wed Apr 15, 2015 5:00 am
by TinTin
Thanks Gaev,

I gathered it was another character which was used (I did try [ArrayItem[1]] however not () lol) thanks for the heads up much appreciated.