# WriteStringToFile

int WriteStringToFile (FILE *stream, const char string[]);

## Purpose

Writes a string to file, converting any newlines to the appropriate line terminators for the system.

This is convenient for writing text to a file that was opened in binary mode.

## Parameters

Input
Name | Type | Description
stream | FILE * | Specifies which FILE* stream to output the item to. If stdout is specified, then the item is sent to the standard output device, which is usually the Standard Input/Output window.
string | const char [] | Pass the null–terminated array of characters to write to the file. The null terminator is not written to the file. Any newline (\n) characters in the string are converted to the appropriate line terminators for the system.

## Return Value

Name | Type | Description
result | integer | Returns 0 if the string was written successfully. Returns a negative User Interface Library error code if an error occurred. Possible errors:
–97 | UIEDiskFull