rt

解决方案 »

  1.   

    var
     tmpstr1,tmpstr2 : string;
     n : integer;
    begin
      tempstr := 'asdfadsf';
      n := length(tempstr);
      tmpstr2 := copy(tempstr,(n-2),2);
    end;
      

  2.   

    Returns a substring of a string or a segment of a dynamic array.UnitSystemCategorystring handling routinesfunction Copy(S; Index, Count: Integer): string;
    function Copy(S; Index, Count: Integer): array;
      

  3.   

    var
      str1,str1:string;
    begin
      str1:='1234';
      str2:=copy(str1,length(trim(str1))-2,2);
    end;
      

  4.   

    应该是:result:=copy(ss,length(ss)-1,2);
      

  5.   

    Result:=Copy(MyStr,Length(MyStr)-1,2);
    搞定,接分!