Here is what I need to do:
I have a flat file. I need to highlight the certain parts (more than one occurance) in red of the file. I can get the file name, the offset and the length of the string to be highlighted from a DB, which I know how. But I don't know how to correctly insert html tags into this file at the RIGHT position.
I guess the short answer is using seek(). But I don't exactly know how to use it. Could someone kindly show me an example?
BTW, I want the newfile with the correct highlights stored in memory instead of in the hard drive.
Thank you for your help.
I have a flat file. I need to highlight the certain parts (more than one occurance) in red of the file. I can get the file name, the offset and the length of the string to be highlighted from a DB, which I know how. But I don't know how to correctly insert html tags into this file at the RIGHT position.
I guess the short answer is using seek(). But I don't exactly know how to use it. Could someone kindly show me an example?
BTW, I want the newfile with the correct highlights stored in memory instead of in the hard drive.
Thank you for your help.