unit1.~pas
来自「Delphi的函数例子」· ~PAS 代码 · 共 41 行
~PAS
41 行
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Label1.Caption := StringReplace('我们是朋友','我','他',[rfIgnoreCase,rfReplaceAll]);
Label2.Caption := StringReplace('When THE user presses a mouse button,','e','te',[rfIgnoreCase, rfReplaceAll]);
Label3.Caption := StringReplace('When THE user presses a mouse button,','e','te',[rfReplaceAll]);
Label4.Caption := StringReplace('When THE user presses a mouse button,','e','te',[rfIgnoreCase]);
Label5.Caption := StringReplace('When THE user presses a mouse button,','se','te',[rfIgnoreCase, rfReplaceAll]);
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?