Re: TIB: String command??


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

Re: TIB: String command??




Try this:

"HELLO THERE" -> Str1
sub(Str1,3,1) -> Str2     // Str2 = "L"

The syntax of sub( ) is
sub(string,starting_position,length_of_substring)
(at least for the 83-86, not sure about the 89)

>From: "Simon Trimble" <gingerno1@hotmail.com>
>Reply-To: ti-basic@lists.ticalc.org
>To: ti-basic@lists.ticalc.org
>Subject: TIB: String command??
>Date: Thu, 24 Aug 2000 20:30:47 BST
>
>
>Does anyone know how i can 'grab' a character from a string at whatever
>place i specify it to get it at....
>
>E.g.
>Theoretically speaking...
>
>'hello there'=>a
>grab('a',3)=>b
>print b
>
>these lines of code should return the first letter 'l' from the string
>stored in 'a'  (The '3' means 3 characters along).
>
>And heres another example...
>
>'hello there'=>a
>grab('a',7)=>b
>print b
>
>These lines of code should print the letter 't' (The 7'th character along
>the string).
>
>Tell me if you need more info.
>
>Thanks,  Simon.
>
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com