delphi 字符串显示后5位


本文整理自网络,侵删。

 
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);
begin
Caption:=EndStr('12345678910',5);   //结果78910
end;

相关阅读 >>

Delphi 检查屏幕是否处于锁屏或关闭状态

Delphi winapi: setwindowtext - 设置窗口标题

Delphi xe 安卓开发黑屏的另一种解决办法

Delphi 获取网卡mac代码可用2020.01.22

Delphi windows的消息传递--消息盒子

Delphi opendialog使用方法

Delphi 保存图片到数据库

Delphi 精要-读书笔记(内存分配释放)

Delphi tscreen 类 - 通过 screen 更换光标

Delphi 获取屏幕缩放比例

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...

    正在狠努力加载,请稍候...