Navigation:  thinBasic Modules > CGI >

CGI_AddQuote

Previous pageReturn to chapter overviewNext page

 

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)

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com