www.icetips.com  Icetips Utilities Documentation 9/12/2015    

String Class:  FileToLines

Previous  Top  Next  


Prototype: (String pFileName, <String pDel>),Long,PROC

 

pFileNameName of (text) file to read into lines
pDelOptional delimiter to use as End-Of-Line string.   Added 2015-09-12

 

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