Re: TIB: Search String


[Prev][Next][Index][Thread]

Re: TIB: Search String




The inString( ) function does not exist on the 82.  However, it does work on
the 86 and 89 with the same syntax as the 83.

inString(Str1,Str2,startPos)

where
Str1 = the string to search in
Str2 = the string to search for
startPos (optional) = position to start at

Str1 and Str2 can be any string variables (or string literals enclosed in
quotation marks).

Examples:

"A" -> Str1

inString("ABCDEFG",Str1) returns 1 because A is in position 1 of the first
string.

inString("ABCDEFG","DEF") returns 4 because "DEF" starts in position 1 of
the first string.

inString("ABCDEFG",Str1,2) returns 0 because the seach starts at the second
character (B), so the "A" is not found.

inString("TI CALCULATORS KICK ASS",Str1) returns 5 because the first A is
the 5th character.  The other 2 A's are ignored.

----- Original Message -----
From: "Jeff Parker" <mechisiii@yahoo.com>
To: <ti-basic@lists.ticalc.org>
Sent: Thursday, October 12, 2000 16:05
Subject: Re: TIB: Search String


>
> Yeah, there's a way to do this, but it does use
> inString.  If you have an 82, 83/+ I know it will
> work, but not sure about any other calcs.
> Here is the context:
>
> If inString(StrX,StrY
> StrY->StrZ
>
> What this does is this:
> If StrY is found anywhere in StrX, it will output a
> number besides 0, so this If statement will be true.
>
> -Jacotus
>
>
> > Is there a way to search a variable for keywords,
> > but instead of storing it
> > as a number, store it as the word it finds, or
> > another way without the
> > inString?
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Get Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
>
>



Follow-Ups: References: