本文整理自网络,侵删。
function EndStr(const S: String; const Count: Integer): String;var I: Integer; Index: Integer;begin Result := ''; for I := 1 to Count do begin Index := Length(S)-I+1; if Index > 0 then Result := S[Index] + Result; end;end;
procedure TForm1.FormCreate(Sender: TObject);beginCaption:=EndStr('12345678910',5); //结果78910end;
相关阅读 >>
Delphi winapi: setwindowtext - 设置窗口标题
Delphi tscreen 类 - 通过 screen 更换光标
更多相关阅读请进入《Delphi》频道 >>