CGI_AddQuote
<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > CGI > CGI_AddQuote |
Description
Adds a quote (single or double) for each quote in the string.
Syntax
s = CGI_AddQuote(sText AS STRING, nQuote AS NUMBER) AS STRING
Returns
String: the quoted string.
Parameters
Name |
Type |
Optional |
Meaning |
sText |
String |
No |
The string where to add quote |
nQuote |
Number |
No |
The type of quote to find and add, this parameter can be one of these constant: %CGI_SINGLE_QUOTE %CGI_SINGLE_QUOTE |
Remarks
Restrictions
See also
CGI_RemoveQuote, CGI_AddSpecialCharsPrefix, CGI_RemoveSpecialCharsPrefix
Examples
Dim s As String
s = CGI_AddQuote("Hello, I'm Rob", %CGI_Single_QUOTE)
'---The following will print: Hello, I''m Rob
Echo("result: " + s)