Re: Deleting last item of a List
Re: Deleting last item of a List
- Subject: Re: Deleting last item of a List
- From: email@hidden
- Date: Fri, 19 Nov 2004 06:23:07 -0500
Can't seem to delete the last item of a list. ... the last item is an
empty character, most likely a return character, which shows up as ""
... the last empty item might be a space too, ...
-----
set list01 to {"Konrad Adenauer", "Ludwig Erhard", "Kurt Georg
Kiesinger", "Willy Brandt", "Helmut Schmidt", "Helmut Kohl",
"Gerhard Schroeder", return}
if ((list01 ends with "") or (list01 ends with " ") or (list01 ends
with return) or (list01 ends with (ASCII character 10))) then set
list01 to (items (1) thru ((count list01) - 1) of list01) as list
list01
-----
To test - replace 'return' in list01 with "", " ", (ASCII character
10) , (ASCII character 13), and even "
" [yes, press the space bar between the first " and second "], as
well as - other text.
--
SJWL
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden