Board index » cppbuilder » How to seperate letters in a StringList...?

How to seperate letters in a StringList...?


2003-07-27 08:16:49 AM
cppbuilder1
hi dear builders,
can someone tell me how I can seperate letters with a space " " in a
StringList like TMemo or TRichEdit...?
For example:
"PleaseSeperateMe"
into:
"P l e a s e S e p e r a t e M e"
Thanks in advance...
Oren
 
 

Re:How to seperate letters in a StringList...?

On Sun, 27 Jul 2003 02:16:49 +0200, Oren (Halvani.de) wrote:
Quote
"P l e a s e S e p e r a t e M e"
something like the following might work:
AnsiString thing = "PleaseSeparateMe";
AnsiString thing2;
for (int i = 1; i <= thing.Length(); ++i)
{
thing2 = thing2 + thing[i] + " ";
}
thing = thing2;
--
liz
 

Re:How to seperate letters in a StringList...?

On Sun, 27 Jul 2003 02:37:32 +0200, Oren (Halvani.de) wrote:
Quote
...works fine :-)
I'm glad to help :)
--
liz
 

{smallsort}

Re:How to seperate letters in a StringList...?

You can also use the AnsiString::Insert() method
String S = "0123456789!@#$%^&*()abcdefghijABCDEFGHIJ";
for(int i = 2; i <= S.Length(); i+=2)
S = S.Insert(" ", i);
Rodolfo
"Oren (Halvani.de)" < XXXX@XXXXX.COM >wrote in message
Quote
hi dear builders,

can someone tell me how I can seperate letters with a space " " in a
StringList like TMemo or TRichEdit...?
For example:

"PleaseSeperateMe"

into:

"P l e a s e S e p e r a t e M e"

Thanks in advance...


Oren


 

Re:How to seperate letters in a StringList...?

"Oren \(Halvani.de\)" < XXXX@XXXXX.COM >wrote:
Quote
hi dear builders,

can someone tell me how I can seperate letters with a space " " in a
StringList like TMemo or TRichEdit...?
For example:

"PleaseSeperateMe"

into:

"P l e a s e S e p e r a t e M e"

Isn't this the same question you asked last November? Subject:
"How can I seperate a word to single characters ? like this:
OREN to: O R E N"?
Get your answers there.