怎样去掉字符串里面的回车符

解决方案 »

  1.   

    uses SysUtilsStringReplace(字符串,#13,'',[rfReplaceAll])
      

  2.   

    UnitSysUtilsCategorystring handling routinestype
      TReplaceFlags = set of (rfReplaceAll, rfIgnoreCase);
    function StringReplace(const S, OldPattern, NewPattern: string; Flags: TReplaceFlags): string;DescriptionStringReplace replaces occurrences of the substring specified by OldPattern with the substring specified by NewPattern. StringReplace assumes that the source string, specified by S, may contain Multibyte characters.If the Flags parameter does not include rfReplaceAll, StringReplace only replaces the first occurrence of OldPattern in S. Otherwise, all instances of OldPattern are replaced by NewPattern.If the Flags parameter includes rfIgnoreCase, The comparison operation is case insensitive.
      

  3.   

    StringReplace(字符串,#13,'',[rfReplaceAll])
      

  4.   

    uses StrUtilss:=AnsiReplaceStr(s,#13,'');