• 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: Replacing range within a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replacing range within a string


  • Subject: Re: Replacing range within a string
  • From: Michelle Steiner <email@hidden>
  • Date: Tue, 27 Feb 2001 12:12:22 -0800

On 2/27/01 10:23 AM, Bryan Harris <email@hidden> wrote:

>Is there an equivalent of the Perl "substr" command in AS?
>
>More specifically, I'd like to remove the seconds on a "time string of
>(current date)". Is there an easy way to do this?
>
>(something like: set text -6 thru -4 of aTimeString to "")

No. As a matter of fact, the ASLG specifically says "You cannot set the
value of an element of a string."

However, you can do this.

set now to time string of (current date)
set now to text 1 thru 5 of now & text -3 through -1 of now

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Prev by Date: Re: global variable not being recognized by script object subroutine
  • Next by Date: Re: global variable not being recognized by script object subroutine
  • Previous by thread: Re: Replacing range within a string
  • Next by thread: Re: Replacing range within a string
  • Index(es):
    • Date
    • Thread