Delphi ActiveX
Delphi ActiveX
StringBuilder GetBetween
Demonstrates the GetBetween method.Chilkat Delphi ActiveX Downloads
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Chilkat_TLB;
...
procedure TForm1.Button1Click(Sender: TObject);
var
sb: TChilkatStringBuilder;
companyName: WideString;
begin
sb := TChilkatStringBuilder.Create(Self);
sb.Append('<company><name>Chilkat Software</name></company>');
// For example, to get the company name in the string above...
companyName := sb.GetBetween('<name>','</name>');
Memo1.Lines.Add('Company Name = ' + companyName);
end;