Searching for a String Within a Memory File

You can search through a memory file for a string. You can start the search at the top of the memory file or at some other point in the memory file. To search for a string, use one of the two memory file search functions, mf_search() and mf_txtrow():

int mf_search(stp, beg_row, mfp)
 
UCHAR *stp;
/* String to search for
*/
int beg_row;    
/* Row to begin search at
*/
MFILEPTR mfp;

int mf_txtrow(stp, mfp)
/* Memory file to search
*/
UCHAR *stp;
/* String to search for 
*/
MFILEPTR mfp;
/* Memory file to search 
*/

These functions return the number of the row whose beginning matches the specified string. mf_txtrow() begins searching on line 0; mf_search() allows you to specify the line number to begin searching on.


Home Contents Previous Next