delphi - Convert the numbers of a set to String -
i save numbers myset = set of 1..8
mystring : string
. there function inttostr
can this?
i have scheduler, takes in string in form of (* * * * * * * *)
. 1 of stars represents days of execution, , myset
list of days. example 1 monday, 2 tuesday. have save numbers set string, this: (0 0 15 * * * 1,2,3 *)
. means, scheduler trigger every monday, tuesday, wednesday @ 15:00.
if want read more format: http://www.nncron.ru/help/en/working/cron-format.htm
use for..in iterator produce wanted string:
type myset = set of 1..8; function mysettostring(const s: myset): string; var i: integer; begin result := ''; in s begin result := result + inttostr(i) + ','; end; setlength(result,length(result)-1); end;
Comments
Post a Comment