字符串左右添加字符

var
s:string;
q:Char;
str:string;
begin
  //System.SysUtils
  s:='abc';
  q:='/';
  //字符串左右添加字符   /abc/
  str:=AnsiQuotedStr(s,q);
  Edit1.Text:=str;
 //字符串左右添加单引号 'abc'
  str:= QuotedStr(s);
  Edit2.Text:=str;

end;

猜你喜欢

转载自blog.csdn.net/ozhy111/article/details/81906506