开发者

Reading Chars one by one from string and add them to TMemo [duplicate]

This question already has answers here: Closed 11 years ago.开发者_JAVA百科

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜