首页 > 其他 > 详细

System.Insert - 插入字符串

时间:2015-06-08 13:17:20      阅读:229      评论:0      收藏:0      [点我收藏+]
System.Insert - 插入字符串

procedure Insert(
  Substr: String;   {要插入的字符串; 可以是常量}
  var Dest: String; {源字符串}
  Index: Integer    {从第几个字符前插入}
);

举例:
var
  ss,s: WideString;
begin
  ss := 万一的博客;
  s :=  Delphi ;
  Insert(s, ss, 4);
  ShowMessage(ss);  {万一的 Delphi 博客}
end;


var
  ss,s: string;
begin
  ss := 万一的博客;
  s :=  Delphi ;
  Insert(s, ss, 7);
  ShowMessage(ss);  {万一的 Delphi 博客}
end;

System 单元下的公用函数目录

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

System.Insert - 插入字符串

原文:http://www.cnblogs.com/CodeGear/p/4560534.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!