file_find (var handle,char* string)
Finds a string in a file, and places the file read
pointer behind the found string.
Parameters:
handle - File handle.
string - String to find (char* or STRING*).
Returns:
>0 - String found, number of characters from the previous position is returned.
<0 - String not found, end of file reached.
Remarks:
The file must be open for reading.
The search is case sensitive and starts with the current file read pointer position.
Example:
fhandle = file_open_read("test.txt"); // test.txt contains "this,was,a,test"
file_find(fhandle,"was"); // returns 8 and places the read pointer at the second ",".
file_close(fhandle);
See also:
file_open_read,
file_close,
file_var_read,
file_str_write, file_chr_read,
file_asc_write, file_asc_read, txt_load, delimit_str
► latest
version online