• 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: Breaking up a long string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Breaking up a long string


  • Subject: Re: Breaking up a long string
  • From: John Delacour <email@hidden>
  • Date: Thu, 19 Jun 2003 11:00:19 +0100
  • Mac-eudora-version: 6.0a23

At 11:48 pm -0500 18/6/03, Joseph Weaks wrote:

Any suggestions on a better way to do this?

set thisParagraph to "A really long paragraph that I need to break into longer chunks..."

You need an apostle!


What about this:


set p to "Not a very long paragraph but long enough"
set {n, ls, f, pp} to {12, {}, "/tmp/a" as POSIX file, return & return}
open for access f with write permission
write p to f
close access f
open for access f
repeat
try
set end of ls to read f for n
on error
exit repeat
end try
end repeat
close access f
set my text item delimiters to pp
set paras to "" & ls
set my text item delimiters to ""
paras


JD



.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Breaking up a long string (From: Joseph Weaks <email@hidden>)

  • Prev by Date: Re: [OT] Getting the labels of a record
  • Next by Date: Alias's original item
  • Previous by thread: Breaking up a long string
  • Next by thread: Re: key,value pairs
  • Index(es):
    • Date
    • Thread