Source language: Translate to:

StrParse

General questions about NeoAppBuilder - our rapid application development tool for building HTML5, web and mobile apps.

Moderator: Neosoft Support

StrParse

Postby TinTin » Wed Apr 15, 2015 1:53 am

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
TinTin
 
Posts: 162
Joined: Sun Dec 06, 2009 4:03 am
Location: UK

Re: StrParse

Postby Gaev » Wed Apr 15, 2015 4:55 am

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])]" ""
User avatar
Gaev
 
Posts: 3717
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: StrParse

Postby TinTin » Wed Apr 15, 2015 5:00 am

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.
TinTin
 
Posts: 162
Joined: Sun Dec 06, 2009 4:03 am
Location: UK


Return to General NeoAppBuilder Discussion

Who is online

Users browsing this forum: No registered users and 1 guest