CAPL Script

FileGetString

Syntax

long fileGetString (char buff[], long buffsize, dword fileHandle);

Method(Dynamic)

long File::GetString(char buff[], long buffsize);

Function

The function reads a string from the specified file into the bufferbuff. Characters are read until the end of line is reached or the number of read characters is equal tobuffsize-1.The end of line is marked either The end of line in the buffer is represented by a line feed. See alsofileGetStringSZ. If the end of a line was encountered, the returned string contains a new line character. Else, the next call tofileGetStringwill start reading in the last line starting with the first character which didn't fit into the buffer on the previous call.

Parameters

buff Buffer for the read-out string.

buffsize

Length of the string.

fileHandle

Handle to the file.

Return Values

If an error occurs, the return value is 0, else 1.

Example

Class: File