gpt4 book ai didi

string - Delphi中有双引号字符串函数吗?

转载 作者:行者123 更新时间:2023-12-03 15:38:51 24 4
gpt4 key购买 nike

我知道 QuotedStr 函数,但是是否有类似的双引号函数

for i := 0 to List.count - 1 do
begin
List[i] := DoubleQuotedStr(List[i]);
end;

最佳答案

您可以使用AnsiQuotedStr它接受引号字符:

List[i] := AnsiQuotedStr(List[i], '"');

来自documentation :

function AnsiQuotedStr(const S: string; Quote: Char): string;

....

Use AnsiQuotedStr to convert a string (S) to a quoted string, using the provided Quote character. A Quote character is inserted at the beginning and end of S, and each Quote character in the string is doubled.

关于string - Delphi中有双引号字符串函数吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36462816/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com