举例:
var ss,s: string; begin ss := ' Delphi '; s := Trim(ss); {删除两边空格} ShowMessage('^' + s + '$'); {^Delphi$} s := TrimLeft(ss); {删除左空格} ShowMessage('^' + s + '$'); {^Delphi $} s := TrimRight(ss); {删除右空格} ShowMessage('^' + s + '$'); {^ Delphi$} end;SysUtils 单元下的公用函数目录