what’s the easiest way to cut string in Flex ?
I mean, I have a sequence of urls, I want them at most 60 characters length. If they are longer they should be cut and “…” should be added at the end.
<mx:LinkButton label="{bookmarksRepeater.currentItem.name}" click="navigateToURL(new URLRequest(event.currentTarget.label.toString()))" />
thanks
if you can run full flex code in the label=”” section, perhaps set the label to this:
it’s a conditional statement: if the name length is less than or equal to 60, just use the name, otherwise use the first 57 characters of the name and ‘…’