ÿþ<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=unicode"> <META content="MSHTML 5.50.4134.600" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Mark</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>I always use a simple bit of code found on the net ...</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>Called QckParse.Pas - basically just creates a string list of parsed fields for a given line of text and you can set the delimiter (can be more than one character)</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2>If you want a copy just email me.</FONT></DIV> <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV> <DIV><FONT face=Arial size=2><FONT color=#000000 size=2> <P align=left>unit Qckparse;</P> <P align=left>{ Barry Mullan, cis.76473,3237</P> <P align=left>Simple parse function which allows the parsing of a Delphi type string</P> <P align=left>using a string separator. The separator is also a Delphi string type</P> <P align=left>and can be more than one character eg. 'and'. Words are parsed into</P> <P align=left>a TStringList which can be referenced using this objects properties</P> <P align=left>and methods.</P> <P align=left></P> <P align=left>This is strictly version 1.0. Enhancements will include exception</P> <P align=left>handling etc. Use at your own risk. Any suggestions or enhancements</P> <P align=left>would be greatly appreciated.</P> <P align=left></P> <P align=left>To use :</P> <P align=left>Copy 'Qckparse.pas' to project directory and include 'Qckparse' in your</P> <P align=left>USES statement.</P> <P align=left></P> <P align=left>Declaration :</P> <P align=left>function Parse( aString : String; aSeparator : String;</P> <P align=left>aWordList : TStringList ) : Integer;</P> <P align=left></P> <P align=left>Sample Usage :</P> <P align=left>try</P> <P align=left>WordList := TStringList.Create;</P> <P align=left>Parse(TextToParse.Text, TextSeparator.Text, WordList);</P> <P align=left>ParsedList.Items := WordList;</P> <P align=left>ParsedList.Items.Add( 'Word Count: ' + inttostr(WordList.count));</P> <P align=left>finally</P> <P align=left>WordList.Free;</P> <P align=left>end;</P> <P align=left>}</P> <P align=left>&nbsp;</P> <P align=left>Paul Lowman</P> <P align=left>Lowman Consulting Ltd.<BR>Embedded Systems &amp; Software</P> <P align=left><A href="mailto:paul_lowman@xtra.co.nz">paul_lowman@xtra.co.nz</A></P></FONT></FONT></DIV></BODY></HTML>

Reply via email to