Ну вообще то у StringList есть такие свойства, как Names и Values
| Цитата | Indicates the name part of strings with the form Name=Value.
__property AnsiString Names[int Index] = {read=GetName};
Description
When the list of strings for the TStrings object includes strings of the form Name=Value, read Names to access the name part of a string. Names is the name part of the string at the position indicated by Index. Index gives the position of the string, where 0 is the first string, 1 is the second string, and so on. If the string at the specified position is not of the form Name=Value, Names returns an empty string.
Strings of the form Name=Value are commonly found in .ini files. For example, here are a few strings taken from a typical .ini file:
DisplayGrid=1
SnapToGrid=1 GridSizeX=8 GridSizeY=8
The Name that identifies the string is to the left of the equal sign (=), and the current Value of the Name identifier is on the right side. There should be no spaces present before or after the equal sign.
|
| Цитата | Represents the value part of a string associated with a given Name, on strings with the form Name=Value.
__property AnsiString Values[AnsiString Name] = {read=GetValue, write=SetValue};
Description
When the list of strings for the TStrings object includes strings of the form Name=Value, use Values to get or set the value part of a string associated with a specific name part. If the list does not contain any strings of the proper Name=Value form, or if none of those strings matches the Name index, Values returns an empty string.
Note: The Name index is case-insensitive. That is, Values is the value part for the first occurrence of Name or an equivalent string that differs only in case.
Strings of the form Name=Value are commonly found in .ini files. For example, here are a few strings taken from a typical .ini file:
DisplayGrid=1
SnapToGrid=1 GridSizeX=8 GridSizeY=8
The Name that identifies the string is to the left of the equal sign (=), and the current Value of the Name identifier is on the right side. There should be no spaces present before or after the equal sign.
|
|