This article covers features introduced in SpiderMonkey 1.8.5
Write string into file with escaping.
Syntax
bool JS_FileEscapedString(FILE *fp, JSString *str, char quote);
| Name | Type | Description | 
|---|---|---|
| fp | FILE * | A file pointer to write into. | 
| str | JSString * | A string to write into the file. | 
| quote | char | One of 0, single quote, and double quote. | 
Description
JS_FileEscapedString writes str into file fp escaping any non-printable or non-ASCII character. If quote is not 0, it must be a single or double quote character that will quote the output.
If successful, JS_FileEscapedString returns true, otherwise false.