| || |
Getting the position of some text in a file
Is there something similar in lines with
FileSetPointer(hFile,0,FP_RELATIVE) for getting the position of a certain text in a file.
Something like FileGetPointer(hFile,text) ? Can someone share logic or any help on this?
The function should search for a text string, then return its position.
Thanks in Advance
Re: Getting the position of some text in a file
Using StrPos(sTarget,Source,[bBackward]) you can find the position of text.Please go through help for more details of StrPos function.
I am sharing some logic,hope it would be useful.
//First read the contents of file to list than using the loop search for the text to find the position.
List of string lsContents,string sLine,int iPos,string sText
+for each sLine in lsContents
+if (StrPos(sText,sLIne) !=0)