• 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: Removing leading and railing blanks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing leading and railing blanks


  • Subject: Re: Removing leading and railing blanks
  • From: Jeffrey Mattox <email@hidden>
  • Date: Tue, 25 Feb 2003 02:46:30 -0600

At 11:04 PM -0800 2/24/03, Michael Terry wrote:
On 2/24/03 10:51 PM, "Jeffrey Mattox" <email@hidden> wrote:

What's the most efficient way to remove leading and trailing blanks
from a string?

set AppleScript's text item delimiters to space
words of theString as string

Well, it has to work with arbitrary strings. That removes leading and trailing spaces, but it also mangles some strings. To wit:

set theString to " date '+%B %e, %G' "
set AppleScript's text item delimiters to space
words of theString as string
-- "date + % B % e % G"

Jeff
_______________________________________________
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: Removing leading and railing blanks
      • From: Michael Terry <email@hidden>
References: 
 >Re: Removing leading and railing blanks (From: Michael Terry <email@hidden>)

  • Prev by Date: Moving a file and changing its name in X
  • Next by Date: Re: Looking into AppleScript (Was: Re: Scripting Mail:get > selection)
  • Previous by thread: Re: Removing leading and railing blanks
  • Next by thread: Re: Removing leading and railing blanks
  • Index(es):
    • Date
    • Thread