本文整理自网络,侵删。
StrUtils.LeftStr、StrUtils.RightStr - 提取左右字符串
举例:
--------------------------------------------------------------------------------
var
ss,s: string;
begin
ss := 'CodeGear Delphi 2007';
s := RightStr(ss,4);
ShowMessage(s); {2007}
s := LeftStr(ss,4);
ShowMessage(s); {Code}
end;
相关阅读 >>
Delphi有无生成空格的函数,like vb的space(1)
Delphi excel操作,写了个adodataset转excel的函数
Delphi webbrowser通过遍历id查找元素是否存在
更多相关阅读请进入《Delphi》频道 >>