delphi 通用函数
1规则字符串转化为数组
var
temp:string;
tList : TStringList;
begin
temp='@1,43,930,43,960,900,-67.5,5,5';
tList := TStringList.Create;
ExtractStrings([','], [], PChar(strTemp), tList);
for i := 0 to tList.Count - 1 do
begin
showmessage( trim(tList[i]));
end;
end
2字符串从左到右字符出现的位置
var
deviceAddress:string;
EndPos: Integer;
begin
deviceAddress:='192.168.0.1:80';
EndPos := LastDelimiter(':', deviceAddress);
end;

浙公网安备 33010602011771号