Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-announce / 2005-06

Free Pascal Contributed units modified entry. (StrWrap1 (String Wrapper))

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

The following entry in the Free Pascal contributed units was modified:

Name : StrWrap1 (String Wrapper)
Author : Lars aka L505
Email : fpcunits1(at)z505(dot)com
Homepage : http://z505.com
FTP site : http://positivesale.com/freePascal/strings/StrWrap1.zip Version : 1.0b
Date : 2005-06-26
Category : File Handling
Supported OS : Linux, Windows, other
Description :
Some string functions to make getting data out of a text files easy, without using stringlists. <p>
Sometimes you find a StringList <b>overkill</b>,
when all you need is some simple string operations. <p>
This unit is essentially a wrapper for readln, assign, reset (that annoying low level you don't need, in simple string and file operations). <pre>
StrLoadFile <i>get entire file into a string var</i> GetLn1 <i>get first line contents from text file into a string var</i> GetLnN <i>get Nth line from text file into a string var</i> </pre>

Update:
Version b now offers
<pre>
ArrayLoadFile <i>get entire file into an array of strings</i> ArrayLoadLines <i>get only the first N lines into an array of strings</i> StrLoadLines <i>get only the first N lines into a string var</i> </pre>
You do not need to include the hefty 'classes' unit when using these functions alone. The file is not loaded into the memory - only the precise lines that you want. Whereas a stringlist loads the entire file into memory no matter what.

Reply by email