Re: Comma delimited paragraph
Re: Comma delimited paragraph
- Subject: Re: Comma delimited paragraph
- From: Yvan KOENIG <email@hidden>
- Date: Thu, 18 May 2017 18:27:49 +0200
Le 18 mai 2017 à 18:23, Steve Mills < email@hidden> a écrit :
On May 18, 2017, at 11:02:39, Yvan KOENIG < email@hidden> wrote: The first one require 264 characters in 7 lines. The second one require 166 characters in 4 lines.
The 2nd one is also potentially faster, since the work is shoved off to the AppleScript implementation instead of looping through the script. Using text item delimiters is not only faster, it's easier and there's less chance of the scripter getting their loop wrong. -- Steve Mills
As was already written, your code fail to reset the original text item delimiters. Worse, it's awfully verbose 🙄
set text item delimiters to "," set csvContent to (every word of originalContent) as text
would do the job. 😉
Yvan KOENIG running Sierra 10.12.5 in French (VALLAURIS, France) jeudi 18 mai 2017 18:27:44
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden