String Functions Do Not Work


It seems the string functions provided don’t work correctly.

I have a global variable (lets call it str1 for these purposes) storing a list of titles:


str1 = Title 1,Title 2,Title 3

Using a call to set text on a widget

Set Text on MyDisplayStr (Value) = str1.split(’,’,3)

Is completely useless, I can only ever access the first string (if this is true then this is a completely useless function, whats the point in splitting a string and only ever getting access to the first part of the split)

Then I tried:

str1 = Title 1 Title 2 Title3

So fixed number of characters per “string”

And then did

Set Text on MyDisplayStr (Value) = str1.substr(0,12)
Set Text on MyDisplayStr2 (Value) = str1.substr(12,12)

And the subset function refuses to parse the spaces and never gives me Title 2

Then I tried (on the same global variable)

Set Text on MyDisplayStr (Value) = str1.substring(0,12)
Set Text on MyDisplayStr2 (Value) = str1.substring(12,24)

with the same results.

Do any of the Axure string functions work correctly?

Okay so after restarting the Mac and restarting everything the substr and substring functions seem to work fine however I still seem to not be able to select the string from using the split function. There seems to be no way in Axure to address and index of an array.

Hey WayneHall,

This sounds like the same issue that was mentioned over here:

String.Split doesn’t allow array indexing

I’ve gone ahead and filed a feature request for that thread so that we can look into allowing indexing of arrays created by string.split(). I will also add this thread to that feature request so that our product management team has an idea of how many users are looking for this functionality. Thanks!

Add me as a plus one!

agree, absolutely pointless function… it works good to Convert array from Title1;Title2;Title3 to Title1,Title2,Title3 but it has no sense as SPLIT means to SPLIT something