Delphi在字符串中删除指定字符串Delphi在字符串中删除指定字符串

习题答案
考试通关必备网站

Delphi在字符串中删除指定字符串

function DelStr(hex,str:string):string;
var
i:Integer;
begin
for i:=1 to Length(hex) do
begin
if Copy(Hex,1,Length(str)) = str then
begin
Delete(Hex,1,Length(str))
end
else
begin
result:=result + Copy(Hex,1,1);
Delete(Hex,1,1);
end;
end;
end;
未经允许不得转载:亿券答案网 » Delphi在字符串中删除指定字符串

我来解答

匿名发表
  • 验证码: