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....



ReadLnString


Unit:SDL_stringl
Class:none
Declaration:function ReadLnString (Instring: string; var StartPos: integer; var eos: boolean; EOLMode: integer): string;

The function ReadLnString reads a string from the position StartPos to the next "end of line" indicator (ASCII 10, or ASCII 13, depending on EOLMode ). The parameter Instring contains the string to be read, the variable parameter eos is TRUE if the end of the string has been reached. Please note that ReadLnString returns only printable characters (>= ASCII 32), all other characters in the string are discarded. On return, the variable parameter StartPos points to the first character after the read line. The parameter EOLMode determines which characters are recognized as "end of line".

EOLMode "End of Line" Remarks
0 $0A (ASCII 10) standard case, use this mode by default
1 $0D (ASCII 13)
2 $0A or $0D this can cause alternating empty lines to be returned
3 $0A$0D UNIX format
4 $0D$0A Windows format


Last Update: 2023-Feb-06