本文整理自网络,侵删。
Function CopyTo_(S : String; StopChar : Char) : String; Var I : Integer; S1 : String;begin// S1 := ''; For I := 1 to Length(S) do if S[I] = StopChar then break else S1 := S1 + S[I]; result := S1;end;
procedure TForm1.FormCreate(Sender: TObject);beginCaption:=CopyTo_('abcd12345','d');end;
相关阅读 >>
Delphi xe5 android 使用system.zip单元释放资源文件
Delphi 进程通讯之wm_copydata 发送程序(senddata.exe)
Delphi removewhitespaces 过滤字符串所有空格
更多相关阅读请进入《Delphi》频道 >>