a couple hurdles I had with Rev
Jared Smith
smith.sgt at gmail.com
Thu Jun 15 20:27:13 EDT 2006
Thanks for the quick reply. I guess I did something wrong when I
search for "deleteKey."
By the way, why doesn't the Undo command under "Edit" in Rev work? I
accidently deleted most of my program and tried to undo it, but it
didn't work. So I decided to close the program without saving.
Annoyingly, it saved anyway and so I have to write everything over
again. I'm kind of frustrated right now.
On 6/15/06, Alex Tweedly <alex at tweedly.net> wrote:
> Mark Smith wrote:
>
> >
> > On 16 Jun 2006, at 00:47, Jared Smith wrote:
> >
> >> Here are a few things that I've been confused about:
> >>
> >> 1) How do I find the number of times a certain character appears in a
> >> string? The "offset" function only finds the first occurance, it
> >> doesn't count them.
> >>
> >
> > This function should work:
> >
> > function charCount tText,tChar
> > set the itemDelimiter to tChar
> > return the number of items in tText - 1
> > end charCount
> >
> Watch out for the case where the last character in the string is the one
> you are interested in; because there isn't an item after it, this gives
> the wrong result - I'd use
>
> function charCount tText,tChar
> set the itemDelimiter to tChar
> if char -1 of tText = tChar then
> return the number of items in tText
> else
> return the number of items in tText - 1
> end if
> end charCount
>
>
> --
> Alex Tweedly http://www.tweedly.net
>
>
>
> --
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.1.394 / Virus Database: 268.8.4/364 - Release Date: 14/06/2006
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list