溫馨提示×

Delphi QuotedStr函數(shù)怎么聲明

小億
102
2023-11-16 10:37:11
欄目: 編程語言

Delphi的QuotedStr函數(shù)是用于在字符串兩側添加引號的函數(shù),可以聲明如下:

function QuotedStr(const S: string): string;

其中,`const S: string`是傳入的字符串參數(shù),返回值為添加引號后的字符串。
使用示例:

var

??str:?string; begin

??str?:=?QuotedStr('Hello?World');?//?將字符串'Hello?World'添加引號

??ShowMessage(str);?//?顯示結果為:'Hello?World' end;

0