The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



ReadStringFromTextFile


Unit:SDL_filesys
Class: none
Declaration: function ReadStringFromTextFile (FName, StartTrigger, EndTrigger: string): string;

The function ReadStringFromTextFile reads text from the file FName and returns the text between the two trigger strings StartTrigger and EndTrigger as the function value.

The search for the trigger strings is not case-sensitive. Leaving the StartTrigger empty causes the file to be read from the beginning, leaving the EndTrigger empty causes the file to be read until the end of file.

Hint: Please note that ReadStringFromTextFile assumes that the file FName is a text file. Reading from a binary file may result in unpredictable behavior of the routine.



Last Update: 2023-Feb-06