其他分享
首页 > 其他分享> > SysUtils.StrMove

SysUtils.StrMove

作者:互联网

SysUtils.StrMove

其实这也是个 Copy 函数, 和 Move 没有关系.
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs;

type
  TForm1 = class(TForm)
    procedure FormCreate(Sender: TObject);
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormCreate(Sender: TObject);
var
  p: PChar;
begin
  p := PChar(StringOfChar('A', 9));

  StrMove(p, '12345', 3);
  ShowMessage(p); {123AAAAAA}

  StrMove(p, '67890', 5);
  ShowMessage(p); {67890AAAA}

  StrMove(p, '12345', 7);
  ShowMessage(p); {12345}
end;

end.
SysUtils 单元下的公用函数目录

posted on 2008-05-13 09:59  万一  阅读(2332)  评论(0)  编辑  收藏

标签:end,TForm1,SysUtils,StrMove,ShowMessage,12345
来源: https://blog.51cto.com/u_14617575/2746261