System.Insert - 插入字符串

System.Insert - 插入字符串

procedure Insert(
Substr: String; {要插入的字符串; 可以是常量}
var Dest: String; {源字符串}
Index: Integer {从第几个字符前插入}
); 举例:
var
ss,s: WideString;
begin
ss := '万一的博客';
s := ' Delphi ';
Insert(s, ss, );
ShowMessage(ss); {万一的 Delphi 博客}
end; var
ss,s: string;
begin
ss := '万一的博客';
s := ' Delphi ';
Insert(s, ss, );
ShowMessage(ss); {万一的 Delphi 博客}
end; System 单元下的公用函数目录

支持2种字符编码的。看来以前 应该尽量用widestring ,以后迁移到Unicode的IDE方便,而且写code的习惯也统一。

上一篇:MVC输出字符串常用四个方式


下一篇:走向面试之数据库基础:二、SQL进阶之case、子查询、分页、join与视图