C1Awk Reference > C1Awk Properties > FindLine Property |
Scans a file for a line containing a specified string.
[form!]C1Awk.FindLine = value As String
Before using this property, you must set the FileName property to the name of the file you want to scan. You don't need to open the file, the Awk will do that for you.
After setting the FindLine property, the line containing the string will be returned in the L (line) property and the CurrPos property will be set to the position within the file where the line was found. If Awk cannot find the line containing the given string, the L property is set to an empty string.
The search is case sensitive. If you want to ignore the case, set the Case property to csUpper and use an upper case search string.
For an example, see the CurrPos property.
String