darkmaster071 Posted July 31, 2010 Share Posted July 31, 2010 So i have a big string and i need to search for a certain sentence in it. Then i need to get the line number in which this sentence was found and copy that entire line into another variable. I see that StringInStr gives me the position/number of chars where that substring is located. But i need a line number and a way to get that entire line. Is there a way to do this? Thanks, help greatly appreciated. Link to comment Share on other sites More sharing options...
seandisanti Posted July 31, 2010 Share Posted July 31, 2010 So i have a big string and i need to search for a certain sentence in it. Then i need to get the line number in which this sentence was found and copy that entire line into another variable.I see that StringInStr gives me the position/number of chars where that substring is located. But i need a line number and a way to get that entire line. Is there a way to do this? Thanks, help greatly appreciated.if you're reading in from a file, you could just use _FileReadToArray() and then check each element for the text and the index would be your line number Link to comment Share on other sites More sharing options...
darkmaster071 Posted August 1, 2010 Author Share Posted August 1, 2010 Just what i need Thanks Link to comment Share on other sites More sharing options...
seandisanti Posted August 1, 2010 Share Posted August 1, 2010 Just what i need Thanksnp, glad to help Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now