Romfile.Find Method

Top  Previous  Next

 

Function:

Locates Nth instance of a substring within a currently opened resource (ROM) file.

Syntax:

romfile.find(frompos as word, byref substr as string, num as word) as word

Returns:

File position at which the substr resides or 0 if the desired substring occurrence is not found

See Also:

Romfile Object

 


Part

Description

frompos

Position in the ROM file from which the search will be conducted (first character of the file is at position 1, if you set this parameter to 0 it will be interpreted as 1).

substr

Substring to search for.

num

Instance number (occurrence) of the substring we are looking for.

Details

note_warning-wt

The romfile object can only access first 65534 bytes of each file. This is because the romfile.pointer is a variable of word type. This method will also work only within this limit.