file_find (var handle,char* string)

Finds a string in a file, and places the file read pointer behind the found string.


handle - File handle.
string - String to find (char* or STRING*).


>0 - String found, number of characters from the previous position is returned.
<0 - String not found, end of file reached.


The file must be open for reading. The search is case sensitive and starts with the current file read pointer position.


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 ",".

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