本文整理自网络,侵删。
function ValidateName(n: string): string;var banned, res: string; i,j: integer;begin res:= n; banned:= '\/:*?"<>|'; for i:= 1 to Length(res) do for j:= 1 to Length(banned) do if res[i]=banned[j] then res[i]:=' '; Result:= res;end;
相关阅读 >>
Delphi socket connect timeout 套字节链接超时设置
Delphi 格式化输出函数(2): formatdatetime
Delphi 捕捉异常 try except语句 和 try finally语句用法以及区别
如何在Delphi中禁用关于“返回值...可能未定义”的警告?
Delphi tms web core webhttprequest1 解析json
更多相关阅读请进入《Delphi》频道 >>