Homeworld 2 : Functionstrfind
Karos Graveyard ::
Function Reference :: Scope Reference :: Variable Reference
strfind(<sString>, <sPattern> [, <iInit> [, <bPlain>]])

Description (from LUA 4 Manual: 6.2 String Manipulation
"Looks for the first match of <sPattern> in <sString>. If it finds one, then strfind returns the indices[sic: e.g., positions] of <sString> where this occurrence starts and ends; otherwise, it returns nil. If the pattern specifies captures (see gsub below), the captured strings are returned as extra results. A third, optional numerical argument <iInit> specifies where to start the search; its default value is 1, and may be negative. A value of 1 as a fourth, optional argument <bPlain> turns off the pattern matching facilities, so the function does a plain 'find substring' operation, with no characters in pattern being considered 'magic'. Note that if plain is given, then <iInit> must be given too."

Example

Arguments
<sString>: the string to search in.
<sPattern>: the pattern to search for.
<iInit>: the position to start searching at.
<bPlain>: specifies that a 'plain' search should be done (i.e., one in which there are no 'magic' characters).

Related Functions
:: ::
Hide Download Bar
Ctrl + Shift + Z = Show/Hide Download Bar
Downloads
Download Manager (S3)
Clear
Left Click: Clear All Finished
Right Click: Undo last clear
100%
Download History
Download list is empty
Functionstrupper.html
100%
--:--
496 KB
-.--
Functionstrupper.html
Source:
From:
To:
G:\HWRMResources\tutorials\hw2wiki.net\Functions_StandAlone\Functionstrupper.html
Status:
496 KB / 496 KB ( -.-- )
File Size:
496 KB
Virus scan:
Time Start:
2019.08.21 - 13:08:19
Time to Complete:
00:01
Time Left:
--:--
Percent Done:
100%
Average Speed:
706 KB/s
mouse double click: download pause/resume
mouse middle click: download cancel
mouse double click: open file
mouse double click + Ctrl: open dir
mouse middle click: delete from list
mouse middle click + Ctrl: delete from system
press mouse button + Ctrl: drag & drop
Functionstrsub.html
100%
00:00
496 KB
2.08 MB/s
Functionstrsub.html
Source:
From:
To:
G:\HWRMResources\tutorials\hw2wiki.net\Functions_StandAlone\Functionstrsub.html
Status:
496 KB / 496 KB ( 2.08 MB/s )
File Size:
496 KB
Virus scan:
Time Start:
2019.08.21 - 13:08:29
Time to Complete:
<00:01
Time Left:
00:00
Percent Done:
100%
Average Speed:
1.98 MB/s
mouse double click: download pause/resume
mouse middle click: download cancel
mouse double click: open file
mouse double click + Ctrl: open dir
mouse middle click: delete from list
mouse middle click + Ctrl: delete from system
press mouse button + Ctrl: drag & drop
Functionstrrep.html
100%
00:00
496 KB
2.16 MB/s
Functionstrrep.html
Source:
From:
To:
G:\HWRMResources\tutorials\hw2wiki.net\Functions_StandAlone\Functionstrrep.html
Status:
496 KB / 496 KB ( 2.16 MB/s )
File Size:
496 KB
Virus scan:
Time Start:
2019.08.21 - 13:08:39
Time to Complete:
<00:01
Time Left:
00:00
Percent Done:
100%
Average Speed:
2.06 MB/s
mouse double click: download pause/resume
mouse middle click: download cancel
mouse double click: open file
mouse double click + Ctrl: open dir
mouse middle click: delete from list
mouse middle click + Ctrl: delete from system
press mouse button + Ctrl: drag & drop
Functionstrlower.html
100%
00:00
496 KB
2.03 MB/s
Functionstrlower.html
Source:
From:
To:
G:\HWRMResources\tutorials\hw2wiki.net\Functions_StandAlone\Functionstrlower.html
Status:
496 KB / 496 KB ( 2.03 MB/s )
File Size:
496 KB
Virus scan:
Time Start:
2019.08.21 - 13:08:50
Time to Complete:
<00:01
Time Left:
00:00
Percent Done:
100%
Average Speed:
1.93 MB/s
mouse double click: download pause/resume
mouse middle click: download cancel
mouse double click: open file
mouse double click + Ctrl: open dir
mouse middle click: delete from list
mouse middle click + Ctrl: delete from system
press mouse button + Ctrl: drag & drop