System.TypInfo.StringToSet
Delphi
function StringToSet(PropInfo: PPropInfo; const Value: string): Integer;
function StringToSet(TypeInfo: PTypeInfo; const Value: string): Integer;
C++
extern DELPHI_PACKAGE int __fastcall StringToSet(PPropInfo PropInfo, const System::UnicodeString Value)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.TypInfo.pas System.TypInfo.hpp |
System.TypInfo | System.TypInfo |
Description
Returns a bit mask of set values for a set type component property.
StringToSet utilises Delphi's RTTI (Run Time Type Information) to return a bit mask of set indices for component's property where that property is a set type.
The property is defined by the PropInfo pointer. (GetPropInfo and GetPropList can be used to obtain such a record).
Value defines a comma separated string of set values the property may have.
The resulting integer value is a bit mask. The 0 bit relates to the 1st set value for the property. If that property value is included in the Value string, it is set to 1, otherwise 0. This continues for bits 1, 2 and so on referring to set positions 2, 3 and so on.