Sign in Join

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

Mailing lists / fpc-announce / 2005-12

Free Pascal Contributed units modified entry. (StrWrap1 (string & array functions))

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 & array functions) Author : Lars (L505) & Jeff (YetAnotherGeek) Email : fpcunits1(at)z505(dot)com
Homepage : http://z505.com/cgi-bin/qkcont/qkcont.cgi?p=StrWrap1 FTP site : http://z505.com/download/pascal/StrWrap1/StrWrap1_v1.0E.zip Version : 1.0F
Date : 2005-12-04
Category : File Handling
Supported OS : Linux, Windows, other
Description :
Latest version is on
<a href="https://opensvn.csie.org/pspcgi/psp-1.5.x-devel/src/extras/StrWrap1/">SVN</a> <p>
Some string and array functions to make getting data out of a text files easy, without using stringlists or functions that would haul in a lot of bloat. Sometimes you find a StringList <b>overkill</b>, when all you need is some simple but powerful string or array operations. <p>
This unit is essentially a wrapper for readln, assign, reset (lower level I/O code). <pre>
-GetFileSize <i>text or binary file</i>
-StrLoadFile, StrSaveFile
-GetLn1, GetLnN, GetLineCount
-ArrayLoadFile, ArrayLoadLines, ArrayLoadRng
-StrLoadLines, StrLoadRng
-MyFile.Lines
-MyFile.Count <i>without ever using a stringlist.
-Additionally, some [0] based array functions instead of [1] based. </i>
</pre>
You do not need to include the hefty 'classes' or Sysutils unit. The entire file is not loaded into the memory with these functions - only the precise lines that you want. Stringlists in contrast, loads the entire file into memory no matter what! <p>
Useful in situations, such as when you have simple config files, or in CGI programming, or in general applications of any sort. Why use classes, and the bulky Free and Create when sometimes all you need is a clean and fast StrLoadFile?

Reply by email