JCL Help:JclSetToStr

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Converts a set to a string of enumeration values.


Pascal

 function JclSetToStr(TypeInfo: PTypeInfo; const Value; const WantBrackets: Boolean = False; const WantRanges: Boolean = False): string;


Parameters

Parameters Description
TypeInfo: PTypeInfo RTTI of the set as returned by System.TypeInfo(set type).
const Value Set value.
const WantBrackets: Boolean = False Flag to surround the result with brackets ('[' and ']'). When set to True, brackets will be present in the resulting string but not in the list.
const WantRanges: Boolean = False Flag to use range specifiers for adjacent values. When set to True adjacent values will be specified as 'First value .. Last value'.


Return Value

The string will be the concatenation of all added values in the Strings parameter, optionally surrounded by '['and ']' depending on the value of WantBrackets.


Description

JclSetToStr converts a set to a string representing the set, optionally surrounded by brackets and optionally using ranges if adjacent values are set. JclSetToStr uses JclSetToList to do the conversion.


About

Unit

JclRTTI


Donator

Theo Bebekis


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page