DELPHI理截取字符串的函数是什么?我现在要截取一个字符串的一部分加到另一个字符串中。麻烦各位大哥了

解决方案 »

  1.   

    function Copy(S; Index, Count: Integer): string;
      

  2.   

    copy  delete  pos  “+”
      

  3.   

    copy可以去查看这个函数的帮助
      

  4.   

    for example:
      
    var
      desStr: String;
      SorStr: String;
    begin
      desStr:= 'zh';
      SorStr:= 'abcd';
      desStr:= desStr+Copy(SorStr,1,2);// then the result is 'zhab'
    end;更多信息请查看帮助!
      

  5.   


    USES 下加 StrUtils后按上边的方法就可以啦。
      

  6.   

    function Copy(S; Index, Count: Integer): string;
      

  7.   

    copy('12345', 1, 3) = '123'
    copy('12345', 3, 2) = '34'