• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Comma delimited paragraph
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Comma delimited paragraph
      • From: Steve Mills <email@hidden>
References: 
 >Comma delimited paragraph (From: "email@hidden" <email@hidden>)
 >Re: Comma delimited paragraph (From: David Gregg <email@hidden>)
 >Re: Comma delimited paragraph (From: Yvan KOENIG <email@hidden>)
 >Re: Comma delimited paragraph (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Comma delimited paragraph
  • Next by Date: Re: Comma delimited paragraph
  • Previous by thread: Re: Comma delimited paragraph
  • Next by thread: Re: Comma delimited paragraph
  • Index(es):
    • Date
    • Thread