现在一个字符串前后有制表符(如#9,#D,#A等),怎么样去掉呀

解决方案 »

  1.   

    用 TrimRight 函数:TrimRight Routine
     
    Trims trailing spaces and control characters from a string.
     
    Unit 
    SysUtils Syntax 
    [Delphi] function TrimRight(const S: string): string; overload;[Delphi] function TrimRight(const S: WideString): WideString; overload;
    Description 
    TrimRight returns a copy of the string S with trailing spaces and control characters removed.
      

  2.   

    TrimRight也能去掉#9,#D,#A之类的吗?
      

  3.   

    TrimRight returns a copy of the string S with trailing spaces and control characters removed---- 什么叫“spaces and control characters”, ASCII 小于等于空格(32)的都是。