[jawsscripts] Re: Character Index in String?
- From: "Donald Marang" <donald.marang@xxxxxxxxx>
- To: <jawsscripts@xxxxxxxxxxxxx>
- Date: Thu, 22 Jan 2009 14:07:19 -0500
Thanks guys! The StringContains function performs the way I expected
StringContainsChars to perform. I thought I looked up that function first.
I am surprised my other keywords like "index" did not find anything.
Perhaps I should not work so late!
Don Marang
----- Original Message -----
From: "Artur Räpp" <rtr@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Thursday, January 22, 2009 4:02 AM
Subject: [jawsscripts] Re: Character Index in String?
> Hello,
>
> How about that test script
>
> Script test ()
>
> var
>
> string tmp
>
> let tmp ="Hello! 1234"
>
>
>
> ; warning, long line
>
> let tmp = stringChopRight (tmp, (stringLength(tmp) -StringContains(tmp,
> "!")))
>
>
>
> sayString (tmp) ; says Hello
>
>
>
> EndScript
>
>
>
> HTH
>
> Artur
>
> ----- Original Message -----
> From: "Donald Marang" <donald.marang@xxxxxxxxx>
> To: <jawsscripts@xxxxxxxxxxxxx>
> Sent: Thursday, January 22, 2009 5:06 AM
> Subject: [jawsscripts] Character Index in String?
>
>
> Hopefully, this is an easy question for you guys.I want to remove all
> characters in a string after the occurrence of a certain character, lets
> say
> ":", and including that character. I looked at the StringLeft and
> StringContainsChars functions. To have these two functions work together,
> the StringContainsChars would need to return the index where the character
> was found rather than just a Boolean True or false. Are there more
> appropriate functions or methods to accomplish this simple task.
> For instance I want to transform the string
> "Menu:only available in To DVD mode"
> to
> "Menu"
>
> Don Marang
>
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
>
>
> __________
> Visit and contribute to The JAWS Script Repository http://jawsscripts.com
>
> View the list's information and change your settings at
> http://www.freelists.org/list/jawsscripts
>
__________
Visit and contribute to The JAWS Script Repository http://jawsscripts.com
View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts
Other related posts: