例如:
tempstr:='42323030303030364141313442344333203445354531300D0A5730303838353637440F343433200EBDFAD6DDD3D00F34300EB6D60F0D0A200EBCB1D7DF0F20303431372035323530333830200ECDF5C5AECABF0F20233530320E0D0A';按照“0D0A” 来给区分开来,不是单个的字符

解决方案 »

  1.   

    procedure TForm1.FormCreate(Sender: TObject);
    var tempstr:string;
        tempList:TstringList;
    begin
      tempstr:='42323030303030364141313442344333203445354531300D0A5730303838353637440F343433200EBDFAD6DDD3D00F34300EB6D60F0D0A200EBCB1D7DF0F20303431372035323530333830200ECDF5C5AECABF0F20233530320E0D0A';
      tempList:=TStringList.Create;
      tempstr:=StringReplace(tempstr,'0D0A','|',[rfReplaceAll]);
      tempList.Delimiter:='|';
      tempList.DelimitedText:=tempstr;
      showmessage(tempList.Text);end;
      

  2.   

    楼上的方法应该可以,将“0D0A”替换为”|“,再按”|“分割,不过做完后要将TStringList.Free
      

  3.   

    借用jinjazz(近身剪(充电中...))的方法,稍微修改一下:procedure TForm1.FormCreate(Sender: TObject);
    var tempstr:string;
    tempList:TstringList;
    begin
    tempstr:='42323030303030364141313442344333203445354531300D0A5730303838353637440F343433200EBDFAD6DDD3D00F34300EB6D60F0D0A200EBCB1D7DF0F20303431372035323530333830200ECDF5C5AECABF0F20233530320E0D0A';
    tempList:=TStringList.Create;
    try
    tempList.Text:=tempstr;
    showmessage(tempList.Text);
    finally
    tempList.Free;
    end;
    end;
      

  4.   

    tempList:=TStringList.Create;
    tempstr:=StringReplace(tempstr,'0D0A', #13, [rfReplaceAll]);
    // 可以直接把'0D0A' 替成 #13 ,省去用Delimiter
    showmessage(tempList.Text);
      

  5.   

    用AnsiReplaceStr函数进行替换可以吗?