本帖最后由 冥界3大法王 于 2021-4-24 12:29 编辑
目的:为了反转00 80 90 80 63 75为 756380908000
[Delphi] 纯文本查看 复制代码 unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
Vcl.StdCtrls;
type
TForm1 = class(TForm)
Edit1: TEdit;
Button1: TButton;
Button2: TButton;
Edit2: TEdit;
Memo1: TMemo;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses
StrUtils;
procedure TForm1.Button1Click(Sender: TObject);
begin
Edit1.Text := reversestring(Edit1.Text);
end;
procedure TForm1.Button2Click(Sender: TObject);
var
strs: TStrings;
i: Integer;
begin
memo1.Clear;
strs := TStringList.Create;
strs.CommaText := Edit2.Text;
for i := strs.Count - 1 downto 0 do
begin
//ShowMessage(strs[i]);
memo1.SelLength := 0;
memo1.SelText := strs[i];
end;
Edit2.Text := memo1.Text;
end;
end.
缺点,多用了一个Memo1控件
|