Project

General

Profile

Actions

$fline » History » Revision 7

« Previous | Revision 7/9 (diff) | Next »
Per Amundsen, 12/23/2019 01:16 AM


Added in 1.9.0

$fline(@name,wildtext,[N],[T],[S])

Returns Nth position of line which matches the specified wildcard text.

See also $flinen.

Parameters

@name - The custom window name to search.
wildtext - Wildcard text to search for.
[N] - If N = 0 returns number of matches, otherwise the Nth match. (Optional, default is 1)
[T] - If T = 0 reference the display area (default), If T is 1, it references the listbox, 2 implies that wildtext is a
regular expression, and 3 for both. (Optional)
[S] - Start the search at the Sth line.

Example

; Open a custom window.
/window @Example

; Add some lines
/aline @Example Test1
/aline @Example Test2
/aline @Example Test3

; Search the display area for the wildtext 'Text*' and print number of results.
//echo -ag $fline(@Example, Test*, 0)

; Search the display area for the wildtext 'Text*' and print the second result.
//echo -ag $fline(@Example, Test*, 2)

Updated by Per Amundsen almost 5 years ago · 7 revisions

Also available in: PDF HTML TXT