var ss,s: AnsiString;begin ss := 'Hello'; s := AnsiQuotedStr(ss, '"'); { 参数2是定界符, Char 类型} ShowMessage(s); { "Hello"} s := AnsiQuotedStr(ss, '#'); ShowMessage(s); { #Hello#} ss := 'Hello#Hello'; { 如果中间包含要添加的定界符, 将被双写} s := AnsiQuotedStr(ss, '#'); ShowMessage(s); { #Hello##Hello#}end;