www.icetips.com  Icetips Utilities Documentation 6/9/2011    

String Class:  FileToLines

Previous  Top  Next  


Prototype: (String pFileName),Long

 

pFileNameName of (text) file to read into lines

 

ReturnsInteger value containing the number of lines read into the Lines property.

 

This method calls the FileToString and then the StringToLines methods to read and parse the file into a Lines queue. 

 

Example:

 

Fn  CString(2049)

I   Long

L   Long

ITST ITStringClass

Code

Fn = 'c:\temp\textfile.txt

If Exists(ShortPath(Fn))

  L = ITST.FileToLines(Fn)

  Loop I = 1 To L

    ITST.ODS(Format(I,@n4) & ' ' & ITST.GetLine(I))

  End

End

 

See also:

FileToString

StringToLines

 



Direct link to this page: http://www.icetips.com/manuals/utilities/filetolines_stringclass.htm