Split Strings

The following example splits a string using a delimiter. Note that StrictDelimiter must be set to true. Otherwise the standard splitter will be uses like space.

var
    item : TStringList;
begin
    item:= TStringList.Create;
    item.Delimiter:='.';
    item.StrictDelimiter:=true;
    item.DelimitedText:='ApplicationName.13655';
    app:= Trim(item[0]);
    key:= Trim(item[1]);
    FreeAndNil(item);
end;        

Werbung



comments powered by Disqus

Copyright Dunkel & Iwer GbR | Datenschutzerklärung | Impressum