1,怎么样获得一个子符串的第一个字符?第n个呢?
2,copy函数的用法怎么样?

解决方案 »

  1.   

    Copy(str,1,1)Copy(字符串,开始位置,结束位置)
      

  2.   

    1 copy(s,1,1)    s[1],s[n]
    2.
    function Copy(S; Index, Count: Integer): string;
    function Copy(S; Index, Count: Integer): array;
      

  3.   

    Copy(字符串,开始位置,个数)
      

  4.   

    function LeftStr(const AText: AnsiString; const ACount: Integer): AnsiString; overload;
    function LeftStr(const AText: WideString; const ACount: Integer): WideString; overload;
      

  5.   

    if Length(strValue) >= 1 then
       result := strValue[1];