haitao: 你这个需要2倍的空间 [阅读: 372] 2005-03-23 16:37:28 d := 0 for i = BeginPos to EndPos do begin if Sour[i] in CKeepChars then begin if d<>0 then Sour[i+d] := Sour[i] else else Inc(d); end; end; 最后把字符串Sour截短d个字符即可