Delphi String Handling: Separating Characters

Posted by Brendan on April 02, 2007

I need take each character in a string and assign it to a label. I don't have the exact code i wrote cause it's at school... It didn't work. But from memory, I wrote something like this:

var 
  word: string;
  j: integer;
  letter: array [1..15] of string;
   
begin
  word := 'DELPHI';
  for j := 1 to length(word) do
  begin
    letter[j]:= copy(word,j,1);

and i've assigned each letter in the array to a different label on the formcreate procedure...

Any Ideas?
Thanks.

Related articles

       

Follow Ups