method readStringToTerminator

string readStringToTerminator(string terminator,string encoding,terminatorDispostion terminatorDispostion);

Argumente

Zurückgegebener Wert

This method reads a string up to a matching string terminator is found and advance the stream's position. If the stream does not contain a match for the terminator the read will fail and the stream's position is unaffected. The string and the terminator string will both be treated as if it is encoded by the encoding type passed in.
var fileStreamObj = shell.serviceManager.basics.fileStream;
var streamReaderObj = shell.serviceManager.basics.rawStreamReader;

//test.txt file must be created by using rawStreamWriter
//for proper read back
fileStreamObj.openForRead("c:\\temp\\test.txt");
streamReaderObj.stream = fileStreamObj;
var firstValue = streamReaderObj.readStringToTerminator("works", "", 0);

fileStreamObj.close();