selecting single or multiple letters in a string type variable
Author |
Message |
timtimpei
|
Posted: Thu May 01, 2008 7:52 pm Post subject: selecting single or multiple letters in a string type variable |
|
|
i was wondering how would you select a single or multiple letters/characters from a string type variable.
for example:
var name : string := "PETER"
and i only want to display the second letter of this name, in this case, the E.
is it possible? if not, wat is another solution? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
The_Bean

|
Posted: Thu May 01, 2008 8:05 pm Post subject: Re: selecting single or multiple letters in a string type variable |
|
|
strings can be used like arrays in which every letter has a spot in the string. So to only call the second letter in the string use " name(2)"
you can also look into the "index" function in the turing help files for other string manipulation technics. |
|
|
|
|
 |
|
|