本文整理自网络,侵删。
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 每年、月、周、日的开始与结束的时间startofayear … startoftheyear … endofayear … endoftheyear
更多相关阅读请进入《Delphi》频道 >>