The ASP AtEndOfLine Property is used to return a Boolean value which specifies that whether the file pointer position at the end of the line in a Textstream file. It returns true if the file pointer positioned at the end of the line otherwise it returns false.
Note: This property will only work on a TextStream object that is open for reading.
Syntax:
TextStreamObject.AtEndOfLine
Example: Below code illustrates the ASP AtEndOfLine Property.
ASP
<% dim fs,f,t,x set fs=Server.CreateObject( "Scripting.FileSystemObject" )
set f=fs.CreateTextFile( "d:\GFG.txt" )
f.write( "Hello GeeksForGeeks" )
f.close set t=fs.OpenTextFile( "d:\GFG.txt" ,1,false)
do while t.AtEndOfLineG<>true
x=t.Read(1)
loop t.close Response.Write( "The last character in the line is: " & x)
%> |
Output:
The last character in the line is s.