Delphi 7 : how to split a string into a TStringList

Posted by mawg on Stack Overflow See other posts from Stack Overflow or by mawg
Published on 2010-06-08T09:21:37Z Indexed on 2010/06/08 9:42 UTC
Read the original article Hit count: 416

Filed under:
|

It's Delphi seven and I want the equivalent of strtok().

Specifically, I have a DFM as a string (pulled from a MySql database) and I want to split it into lines in a TStringList.

It looks something like this ...

'Oject Form1: TScriptForm'#$D#$A'  Left = 0'#$D#$A'  Top = 0'#$D#$A'  Align = alClient'#$D#$A'  BorderStyle = bsNone'#$D#$A'  ClientHeight = 517'#$D#$A'  ClientWidth = 993'#$D#$A'  Color = clBtnFace'#$D#$A'  Font.Charset = DEFAULT_CHARSET'#$D#$A'  Font.Color = clWindowText'#$D#$A'  Font.Height = -11'#$D#$A'  Font.Name = 'MS Sans Serif''#$D#$A'  Font.Style = []'#$D#$A'  OldCreateOrder = False'#$D#$A'  SaveProps.Strings = ('#$D#$A'    'Visible=False')'#$D#$A'  PixelsPerInch = 96'#$D#$A'  TextHeight = 13'#$D#$A'

© Stack Overflow or respective owner

Related posts about delphi

Related posts about delphi-7