• 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 characters from a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing characters from a string


  • Subject: Re: Removing characters from a string
  • From: John Delacour <email@hidden>
  • Date: Mon, 4 Nov 2002 14:51:41 +0000
  • Mac-eudora-version: 5.3a8

At 4:48 pm -0500 29/10/02, Paul Skinner wrote:

if length of (n as string) is greater than 32 then set n to (n as string)'s text 1 thru 32

In the interests of brvty.... it is unnec to chck the len, and this will do:

set n to text 1 thru 32 of ("" & n)


JD


set s to "this/might not.be a legal:name, then again, it could be."
do shell script "perl -e '$_ = qq~" & s & "~; s~\\.|,|:|/~~g; print'"
text 1 through 32 of result
_______________________________________________
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 characters from a string
      • From: Paul Skinner <email@hidden>
  • Prev by Date: Activate - disable Internet Connection
  • Next by Date: Re: Activate - disable Internet Connection
  • Previous by thread: Re: Removing characters from a string
  • Next by thread: Re: Removing characters from a string
  • Index(es):
    • Date
    • Thread