Accessing the last item in a line

Mark Schonewille m.schonewille at
Sun Aug 21 18:31:47 EDT 2011

Yes, this is expected behaviour. If you want to count the last item if it is empty use

Item (number of items of (myVar & "x")) of myVar

Kind regards,

Mark Schonewille

Share the clipboard of your computer over a local network with Clipboard Link

Op 21 aug. 2011 om 23:50 heeft Pete <pete at> het volgende geschreven:

> It seems that if the last item in a string is empty, then trying to access
> it by using "item -1" returns the penultimate item, not the last one.  For
> example, given the string "a,b,"  item -1 of that string comes back as "b".
> This is on LC 4.6.2, OS X 10.6.8.  Is this expected behavior?
> Pete
> Molly's Revenge <>
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list