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:

  word: string;
  j: integer;
  letter: array [1..15] of string;
  word := 'DELPHI';
  for j := 1 to length(word) do
    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?

Related articles


Follow Ups