lengh('12345',3,3);
好像是lengh

解决方案 »

  1.   

    Result := Coopy(SourStr,BegIndex,Resultlength)
      

  2.   

    呵呵,我写一个函数给你:
    function SubStr(Mystr:string;startpos,endpos:integer):string;
    begin
      result:=copy(mystr,startpos,(endpos-startpos));
    end;
      

  3.   

    copy(st,pos,num)
    该函数返回st串中一个从位置pos(整型)处开始的含有num(整型)个字符的子串。如果pos大于
    st字符串的长度。那就会返回一个空串,如果pos在255以外,会引起运行错误。例如,
    st'12345',则copy(st,2,2)返回‘23’。