| View previous topic :: View next topic |
| Author |
Message |
bar Guest
|
Posted: Thu Mar 15, 2007 2:18 pm Post subject: String |
|
|
Hello all
I have a AnsiString variable
String = "Rain*Humidity*Water*Dust"
This values should be stored in 4 different variables.
s1 = Rain
s2 = Humidity
s3=Water
s4=Dust
Can anybody provide the solution for this
Thank
SA |
|
| Back to top |
|
 |
Thorsten Kettner Guest
|
Posted: Thu Mar 15, 2007 4:40 pm Post subject: Re: String |
|
|
"bar" <shaikakbar250281 (AT) yahoo (DOT) co.in> wrote:
| Quote: | I have a AnsiString variable
String = "Rain*Humidity*Water*Dust"
This values should be stored in 4 different variables.
|
Either loop through the string's characters and look out for '*'
to get the individual strings or use a TStringList and split
the String into its parts with ExtractStrings(). |
|
| Back to top |
|
 |
Vladimir Stefanovic Guest
|
Posted: Thu Mar 15, 2007 8:23 pm Post subject: Re: String |
|
|
| Quote: | Can anybody provide the solution for this
|
Look here:
http://tinyurl.com/2tecjc
(Search for Gambit's and Hans's code, even mine)
--
Best Regards,
Vladimir Stefanovic |
|
| Back to top |
|
 |
|