www.icetips.com  Icetips Utilities Documentation 7/6/2014    

String Class:  FileToString

Previous  Top  Next  


Prototype: (String pFileName),String

 

pFileNameName of (text) file to read into string

 

ReturnsString containing the contents of the file

 

This method calls the ReadFileToString method and returns the contents of the FileString property.  After this method is called the FileString property is set to the entire contents of the pFileName file.

 

Example:

ITS  ITStringClass

S    String(1024)

Code

S = ITS.FileToString('test.txt')

! S now contains the contents of test.txt or the first 1024 bytes if test.txt is larger than 1024 bytes.

 

 

See also:

FileString

ReadFileToString

WriteStringToFile

FileToLines



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