method seekToMatchingString

void seekToMatchingString(string match,string encoding,bool includeMatch);

Argumente

Zurückgegebener Wert

This method seeks the stream until a matching string is found. If the stream does not contain a match, then the seek will fail and the stream's position is unaffected. The matching string is treated as if it is encoded by the encoding type passed in. This method only scans forward in the stream.
var fileStreamObj = shell.serviceManager.basics.fileStream;
var streamReaderObj = shell.serviceManager.basics.rawStreamReader;

fileStreamObj.openForRead("c:\\temp\\test.txt");
streamReaderObj.stream = fileStreamObj;
streamReaderObj.seekToMatchingString("First Name: ", "", true);
var firstName = streamReaderObj.readStringOfLength(10, "");

fileStreamObj.close();