• 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
Simple substring help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simple substring help


  • Subject: Simple substring help
  • From: Wade Williams <email@hidden>
  • Date: Fri, 5 Dec 2003 11:06:21 -0600

Given:

set string1 to "MyHD:Folder:SubFolder:File:"

what's the easiest way to accomplish chopping off the "File:" at the end?

I was going to use the text delimeters to chop the string up into its component parts, but then you have to add the colons back in, which seems like more work than should be necessary for this task.

I also thought about trying to find the offset, but can't find an easy way to say "set pos to the offset of the next to last ":" in string1".

My apologies for having to ask - but Applescript does make such questions a bit complex to figure out unless you work with it all the time (which I don't), so assistance from those that do is greatly appreciated.

Wade
_______________________________________________
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.

  • Follow-Ups:
    • Re: Simple substring help
      • From: Christopher Stone <email@hidden>
    • Re: Simple substring help
      • From: Bill White <email@hidden>
  • Prev by Date: make a list
  • Next by Date: Re: make a list
  • Previous by thread: Re: make a list
  • Next by thread: Re: Simple substring help
  • Index(es):
    • Date
    • Thread