Re: Replacing range within a string
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. |
----------------------------------------------------------------------