Nucleus handler tools › Docs › Context › FindLineNumberInTextFile
Context.FindLineNumberInTextFile
Open in the workbench (search, and try it in a handler)
Context.FindLineNumberInTextFile(
path: string | number | boolean,
searchValue: string | number | boolean,
type: Nucleus.SearchType | number | boolean
): number
Returns a line number (int), utilizes a newly created enum SearchType.
path: Full path of the text file to search; it must exist (it is read without a check). Returns the first matching line number, counting from 1, or -1.searchValue: Text to look for, case-sensitive.type: How a line must match: Nucleus.SearchType.Contains, Nucleus.SearchType.Full (the whole line equals searchValue) or Nucleus.SearchType.StartsWith.
✎ Parameters: AI-written from the Nucleus source.
Category: Files
Is this right?
Tell us what's wrong