Reading Chars one by one from string and add them to TMemo [duplicate]
Possible Duplicate:
Adding Characters one by one to TMemo
Hello, I have an array of strings. I want to read the chars of the strings one by one in a loop then display them into a Memo (one by one). Can any one tell me how to do it? Thanks
Use two nested loops. The first iterates over the array of strings. The second iterates over the characters in each string.
procedure DisplayCharsOneByOne(const arr: array of string; Memo: TMemo);
var
s: string;
c: Char;
begin
for s in arr do
for c in s do
Memo.Lines.Add(c);
end;
精彩评论