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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -