本文整理自网络,侵删。
var S: string; I: Integer; Found: Boolean;begin S := 'Hello World'; Found := False; for I := Low (S) to High (S) do Memo1.Lines.Add(S[I]);
另一个循环用法:var S: string; I: Integer; Found: Boolean;begin S := 'Hello World'; Found := False; I := Low (S); while not Found and (I <= High(S)) do begin
Memo1.Lines.Add(S[I]); {if (S[I]) = 'o' then Found := True; } Inc (I); end;
相关阅读 >>
winapi 字符及字符串函数(7): ischarlower - 是否是个小写字母
Delphi getexplorerpid获取系统explorer.exe进程id
Delphi使用project manager添加一个java库到你的应用程序
更多相关阅读请进入《Delphi》频道 >>