quote
| quote | 
  Purpose
 
 
 Quote and encode a text string.
 
 
  Synopsis
 
 function quote(txt:text,qtype:integer,sepchar:integer):text
 function quote(txt:text):text
 
  Arguments
 
 | 
     txt 
     | 
     A
     text object
     | 
| 
     qtype 
     | 
     Quoting convention
     | 
| 
     sepchar 
     | 
     Code of the separator character or 0
     | 
  Example
 
 
 The following statement:
 
 writeln(quote('test CSV "quoted" string',2,44))
 displays:
 "test CSV ""quoted"" string"
 
 
  Further information
 
 
 1. This function generates an encoded form of the provided text string according to the given quoting convention
 qtype (see
 sys_qtype) and separator character
 sepchar. The provided text may be returned unchanged if the selected convention does not require quotes and the text does not include any special character or the specified separator character.
 
 
 2. If argument
 sepchar is
 0, quoting is enforced even if the selected quoting convention would not require quotes.
 
 
 3. In the second form of the routine, parameters
 sys_qtype and
 sys_sepchar are used as default values for arguments
 qtype and
 sepchar.
 
 
  Related topics
 
  
  Module
 
  
