本文整理自网络,侵删。
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 判断是否为空('none', 'null', '')
Delphi 使用google translate实现tts
Delphi 2009 泛型容器单元(generics.collections)[5]: tobject...<t> 系列
更多相关阅读请进入《Delphi》频道 >>