sysutils.tex 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598
  1. %
  2. % $Id$
  3. % This file is part of the FPC documentation.
  4. % Copyright (C) 1999, by Michael Van Canneyt
  5. %
  6. % The FPC documentation is free text; you can redistribute it and/or
  7. % modify it under the terms of the GNU Library General Public License as
  8. % published by the Free Software Foundation; either version 2 of the
  9. % License, or (at your option) any later version.
  10. %
  11. % The FPC Documentation is distributed in the hope that it will be useful,
  12. % but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. % Library General Public License for more details.
  15. %
  16. % You should have received a copy of the GNU Library General Public
  17. % License along with the FPC documentation; see the file COPYING.LIB. If not,
  18. % write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  19. % Boston, MA 02111-1307, USA.
  20. %
  21. \chapter{The SYSUTILS unit.}
  22. This chapter describes the \file{sysutils} unit. The \var{sysutils} unit
  23. was largely written by Gertjan Schouten, and completed by michael Van Canneyt.
  24. It aims to be compatible to the Delphi sysutils unit, but in contrast with
  25. the latter, it is designed to work on multiple platforms.
  26. This chapter starts out with a definition of all types and constants
  27. that are defined, followed by a complete explanation of each function.
  28. \section{Constants and types}
  29. The following general-purpose constants are defined:
  30. \begin{verbatim}
  31. const
  32. SecsPerDay = 24 * 60 * 60; // Seconds and milliseconds per day
  33. MSecsPerDay = SecsPerDay * 1000;
  34. DateDelta = 693594; // Days between 1/1/0001 and 12/31/1899
  35. Eoln = #10;
  36. \end{verbatim}
  37. The following types are used frequently in date and time functions.
  38. They are the same on all platforms.
  39. \begin{verbatim}
  40. type
  41. TSystemTime = record
  42. Year, Month, Day: word;
  43. Hour, Minute, Second, MilliSecond: word;
  44. end ;
  45. TDateTime = double;
  46. TTimeStamp = record
  47. Time: integer; { Number of milliseconds since midnight }
  48. Date: integer; { One plus number of days since 1/1/0001 }
  49. end ;
  50. \end{verbatim}
  51. The following type is used in the \seef{FindFirst},\seef{FindNext}
  52. and \seep{FindClose} functions. The \var{win32} version differs from
  53. the other versions. If code is to be portable, that part shouldn't
  54. be used.
  55. \begin{verbatim}
  56. Type
  57. THandle = Longint;
  58. TSearchRec = Record
  59. Time,Size, Attr : Longint;
  60. Name : TFileName;
  61. ExcludeAttr : Longint;
  62. FindHandle : THandle;
  63. {$ifdef Win32}
  64. FindData : TWin32FindData;
  65. {$endif}
  66. end;
  67. \end{verbatim}
  68. The following constants are file-attributes that need to be matched in the
  69. findfirst call.
  70. \begin{verbatim}
  71. Const
  72. faReadOnly = $00000001;
  73. faHidden = $00000002;
  74. faSysFile = $00000004;
  75. faVolumeId = $00000008;
  76. faDirectory = $00000010;
  77. faArchive = $00000020;
  78. faAnyFile = $0000003f;
  79. \end{verbatim}
  80. The following constants can be used in the \seef{FileOpen} call.
  81. \begin{verbatim}
  82. Const
  83. fmOpenRead = $0000;
  84. fmOpenWrite = $0001;
  85. fmOpenReadWrite = $0002;
  86. \end{verbatim}
  87. The following variables are used in the case translation routines.
  88. \begin{verbatim}
  89. type
  90. TCaseTranslationTable = array[0..255] of char;
  91. var
  92. UpperCaseTable: TCaseTranslationTable;
  93. LowerCaseTable: TCaseTranslationTable;
  94. \end{verbatim}
  95. The initialization code of the \file{sysutils} unit fills these
  96. tables with the appropriate values. For the win32 and go32v2
  97. versions, this information is obtained from the operating system.
  98. The following constants control the formatting of dates.
  99. For the Win32 version of the \file{sysutils} unit, these
  100. constants are set according to the internationalization
  101. settings of Windows by the initialization code of the unit.
  102. \begin{verbatim}
  103. Const
  104. DateSeparator: char = '-';
  105. ShortDateFormat: string = 'd/m/y';
  106. LongDateFormat: string = 'dd" "mmmm" "yyyy';
  107. ShortMonthNames: array[1..12] of string[128] =
  108. ('Jan','Feb','Mar','Apr','May','Jun',
  109. 'Jul','Aug','Sep','Oct','Nov','Dec');
  110. LongMonthNames: array[1..12] of string[128] =
  111. ('January','February','March','April',
  112. 'May','June','July','August',
  113. 'September','October','November','December');
  114. ShortDayNames: array[1..7] of string[128] =
  115. ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
  116. LongDayNames: array[1..7] of string[128] =
  117. ('Sunday','Monday','Tuesday','Wednesday',
  118. 'Thursday','Friday','Saturday');
  119. \end{verbatim}
  120. The following constants control the formatting of times.
  121. For the Win32 version of the \file{sysutils} unit, these
  122. constants are set according to the internationalization
  123. settings of Windows by the initialization code of the unit.
  124. \begin{verbatim}
  125. Const
  126. ShortTimeFormat: string = 'hh:nn';
  127. LongTimeFormat: string = 'hh:nn:ss';
  128. TimeSeparator: char = ':';
  129. TimeAMString: string[7] = 'AM';
  130. TimePMString: string[7] = 'PM';
  131. \end{verbatim}
  132. The following constants control the formatting of currencies
  133. and numbers. For the Win32 version of the \file{sysutils} unit,
  134. these constants are set according to the internationalization
  135. settings of Windows by the initialization code of the unit.
  136. \begin{verbatim}
  137. Const
  138. DecimalSeparator : Char = '.';
  139. ThousandSeparator : Char = ',';
  140. CurrencyDecimals : Byte = 2;
  141. CurrencyString : String[7] = '$';
  142. { Format to use when formatting currency :
  143. 0 = $1 1 = 1$ 2 = $ 1 3 = 1 $
  144. 4 = Currency string replaces decimal indicator.
  145. e.g. 1$50
  146. }
  147. CurrencyFormat : Byte = 1;
  148. { Same as above, only for negative currencies:
  149. 0 = ($1)
  150. 1 = -$1
  151. 2 = $-1
  152. 3 = $1-
  153. 4 = (1$)
  154. 5 = -1$
  155. 6 = 1-$
  156. 7 = 1$-
  157. 8 = -1 $
  158. 9 = -$ 1
  159. 10 = $ 1-
  160. }
  161. NegCurrFormat : Byte = 5;
  162. \end{verbatim}
  163. The following types are used in various string functions.
  164. \begin{verbatim}
  165. type
  166. PString = ^String;
  167. TFloatFormat = (ffGeneral, ffExponent, ffFixed, ffNumber, ffCurrency);
  168. \end{verbatim}
  169. The following constants are used in the file name handling routines. Do not
  170. use a slash of backslash character directly as a path separator; instead
  171. use the \var{OsDirSeparator} character.
  172. \begin{verbatim}
  173. Const
  174. DirSeparators : set of char = ['/','\'];
  175. {$ifdef Linux}
  176. OSDirSeparator = '/';
  177. {$else}
  178. OsDirSeparator = '\';
  179. {$endif}
  180. \end{verbatim}
  181. \section{Date and time functions}
  182. \subsection{Date and time formatting characters}
  183. \label{se:formatchars}
  184. Various date and time formatting routines accept a format string.
  185. to format the date and or time. The following characters can be used
  186. to control the date and time formatting:
  187. \begin{description}
  188. \item[c] : shortdateformat + ' ' + shorttimeformat
  189. \item[d] : day of month
  190. \item[dd] : day of month (leading zero)
  191. \item[ddd] : day of week (abbreviation)
  192. \item[dddd] : day of week (full)
  193. \item[ddddd] : shortdateformat
  194. \item[dddddd] : longdateformat
  195. \item[m] : month
  196. \item[mm] : month (leading zero)
  197. \item[mmm] : month (abbreviation)
  198. \item[mmmm] : month (full)
  199. \item[y] : year (four digits)
  200. \item[yy] : year (two digits)
  201. \item[yyyy] : year (with century)
  202. \item[h] : hour
  203. \item[hh] : hour (leading zero)
  204. \item[n] : minute
  205. \item[nn] : minute (leading zero)
  206. \item[s] : second
  207. \item[ss] : second (leading zero)
  208. \item[t] : shorttimeformat
  209. \item[tt] : longtimeformat
  210. \item[am/pm] : use 12 hour clock and display am and pm accordingly
  211. \item[a/p] : use 12 hour clock and display a and p accordingly
  212. \item[/] : insert date seperator
  213. \item[:] : insert time seperator
  214. \item["xx"] : literal text
  215. \item['xx'] : literal text
  216. \end{description}
  217. \begin{type}{TDateTime}
  218. \Declaration
  219. TDateTime = Double;
  220. \Description
  221. Many functions return or require a \var{TDateTime} type, which contains
  222. a date and time in encoded form. The date and time are converted to a double
  223. as follows:
  224. \end{type}
  225. \begin{function}{Date}
  226. \Declaration
  227. Function Date: TDateTime;
  228. \Description
  229. \var{Date} returns the current date in \var{TDateTime} format.
  230. For more information about the \var{TDateTime} type, see \seety{TDateTime}.
  231. \Errors
  232. None.
  233. \SeeAlso
  234. \seef{Time},\seef{Now}, \seety{TDateTime}.
  235. \end{function}
  236. \latex{\inputlisting{sysutex/ex1.pp}}
  237. \html{\input{sysutex/ex1.tex}}
  238. \begin{function}{DateTimeToFileDate}
  239. \Declaration
  240. Function DateTimeToFileDate(DateTime : TDateTime) : Longint;
  241. \Description
  242. \var{DateTimeToFileDate} function converts a date/time indication in
  243. \var{TDateTime} format to a filedate function, such as returned for
  244. instance by the \seef{FileAge} function.
  245. \Errors
  246. None.
  247. \SeeAlso
  248. \seef{Time}, \seef{Date}, \seef{FileDateToDateTime},
  249. \seep{DateTimeToSystemTime}, \seef{DateTimeToTimeStamp}
  250. \end{function}
  251. \latex{\inputlisting{sysutex/ex2.pp}}
  252. \html{\input{sysutex/ex2.tex}}
  253. \begin{function}{DateTimeToStr}
  254. \Declaration
  255. Function DateTimeToStr(DateTime: TDateTime): string;
  256. \Description
  257. \var{DateTimeToStr} returns a string representation of
  258. \var{DateTime} using the formatting specified in
  259. \var{ShortDateTimeFormat}. It corresponds to a call to
  260. \var{FormatDateTime('c',DateTime)} (see \sees{formatchars}).
  261. \Errors
  262. None.
  263. \SeeAlso
  264. \seef{FormatDateTime}, \seety{TDateTime}.
  265. \end{function}
  266. \latex{\inputlisting{sysutex/ex3.pp}}
  267. \html{\input{sysutex/ex3.tex}}
  268. \begin{procedure}{DateTimeToString}
  269. \Declaration
  270. Procedure DateTimeToString(var Result: string; const FormatStr: string; const DateTime: TDateTime);
  271. \Description
  272. \var{DateTimeToString} returns in \var{Result} a string representation of
  273. \var{DateTime} using the formatting specified in \var{FormatStr}.
  274. for a list of characters that can be used in the \var{FormatStr} formatting
  275. string, see \sees{formatchars}.
  276. \Errors
  277. In case a wrong formatting character is found, an \var{EConvertError} is
  278. raised.
  279. \SeeAlso
  280. \seef{FormatDateTime}, \sees{formatchars}.
  281. \end{procedure}
  282. \latex{\inputlisting{sysutex/ex4.pp}}
  283. \html{\input{sysutex/ex4.tex}}
  284. \begin{procedure}{DateTimeToSystemTime}
  285. \Declaration
  286. Procedure DateTimeToSystemTime(DateTime: TDateTime; var SystemTime: TSystemTime);
  287. \Description
  288. \var{DateTimeToSystemTime} converts a date/time pair in \var{DateTime}, with
  289. \var{TDateTime} format to a system time \var{SystemTime}.
  290. \Errors
  291. None.
  292. \SeeAlso
  293. \seef{DateTimeToFileDate}, \seef{SystemTimeToDateTime},
  294. \seef{DateTimeToTimeStamp}
  295. \end{procedure}
  296. \latex{\inputlisting{sysutex/ex5.pp}}
  297. \html{\input{sysutex/ex5.tex}}
  298. \begin{function}{DateTimeToTimeStamp}
  299. \Declaration
  300. Function DateTimeToTimeStamp(DateTime: TDateTime): TTimeStamp;
  301. \Description
  302. \var{DateTimeToSystemTime} converts a date/time pair in \var{DateTime}, with
  303. \var{TDateTime} format to a \var{TTimeStamp} format.
  304. \Errors
  305. None.
  306. \SeeAlso
  307. \seef{DateTimeToFileDate}, \seef{SystemTimeToDateTime},
  308. \seef{DateTimeToSystemTime}
  309. \end{function}
  310. \latex{\inputlisting{sysutex/ex6.pp}}
  311. \html{\input{sysutex/ex6.tex}}
  312. \begin{function}{DateToStr}
  313. \Declaration
  314. Function DateToStr(Date: TDateTime): string;
  315. \Description
  316. \var{DateToStr} converts \var{Date} to a string representation. It uses
  317. \var{ShortDateFormat} as it's formatting string. It is hence completely
  318. equivalent to a \var{FormatDateTime('ddddd', Date)}.
  319. \Errors
  320. None.
  321. \SeeAlso
  322. \seef{TimeToStr}, \seef{DateTimeToStr}, \seef{FormatDateTime},
  323. \seef{StrToDate}
  324. \end{function}
  325. \latex{\inputlisting{sysutex/ex7.pp}}
  326. \html{\input{sysutex/ex7.tex}}
  327. \begin{function}{DayOfWeek}
  328. \Declaration
  329. Function DayOfWeek(DateTime: TDateTime): integer;
  330. \Description
  331. \var{DayOfWeek} returns the day of the week from \var{DateTime}.
  332. \var{Sunday} is counted as day 1, \var{Saturday} is counted as
  333. day 7. The result of \var{DayOfWeek} can serve as an index to
  334. the \var{LongDayNames} constant array, to retrieve the name of
  335. the day.
  336. \Errors
  337. None.
  338. \SeeAlso
  339. \seef{Date}, \seef{DateToStr}
  340. \end{function}
  341. \latex{\inputlisting{sysutex/ex8.pp}}
  342. \html{\input{sysutex/ex8.tex}}
  343. \begin{procedure}{DecodeDate}
  344. \Declaration
  345. Procedure DecodeDate(Date: TDateTime; var Year, Month, Day: word);
  346. \Description
  347. \var{DecodeDate} decodes the Year, Month and Day stored in \var{Date},
  348. and returns them in the \var{Year}, \var{Month} and \var{Day} variables.
  349. \Errors
  350. None.
  351. \SeeAlso
  352. \seef{EncodeDate}, \seep{DecodeTime}.
  353. \end{procedure}
  354. \latex{\inputlisting{sysutex/ex9.pp}}
  355. \html{\input{sysutex/ex9.tex}}
  356. \begin{procedure}{DecodeTime}
  357. \Declaration
  358. Procedure DecodeTime(Time: TDateTime; var Hour, Minute, Second, MilliSecond: word);
  359. \Description
  360. \var{DecodeDate} decodes the hours, minutes, second and milliseconds stored
  361. in \var{Time}, and returns them in the \var{Hour}, \var{Minute} and
  362. \var{Second} and \var{MilliSecond} variables.
  363. \Errors
  364. None.
  365. \SeeAlso
  366. \seef{EncodeTime}, \seep{DecodeDate}.
  367. \end{procedure}
  368. \latex{\inputlisting{sysutex/ex10.pp}}
  369. \html{\input{sysutex/ex10.tex}}
  370. \begin{function}{EncodeDate}
  371. \Declaration
  372. Function EncodeDate(Year, Month, Day :word): TDateTime;
  373. \Description
  374. \var{EncodeDate} encodes the \var{Year}, \var{Month} and \var{Day} variables to
  375. a date in \var{TDateTime} format. It does the opposite of the
  376. \seep{DecodeDate} procedure.
  377. The parameters must lie withing valid ranges (boundaries included):
  378. \begin{description}
  379. \item[Year] must be between 1 and 9999.
  380. \item[Month] must be within the range 1-12.
  381. \item[Day] msut be between 1 and 31.
  382. \end{description}
  383. \Errors
  384. In case one of the parameters is out of it's valid range, 0 is returned.
  385. \SeeAlso
  386. \seef{EncodeTime}, \seep{DecodeDate}.
  387. \end{function}
  388. \latex{\inputlisting{sysutex/ex11.pp}}
  389. \html{\input{sysutex/ex11.tex}}
  390. \begin{function}{EncodeTime}
  391. \Declaration
  392. Function EncodeTime(Hour, Minute, Second, MilliSecond:word): TDateTime;
  393. \Description
  394. \var{EncodeTime} encodes the \var{Hour}, \var{Minute}, \var{Second},
  395. \var{MilliSecond} variables to a \var{TDateTime} format result.
  396. It does the opposite of the \seep{DecodeTime} procedure.
  397. The parameters must have a valid range (boundaries included):
  398. \begin{description}
  399. \item[Hour] must be between 0 and 23.
  400. \item[Minute,second] must both be between 0 and 59.
  401. \item[Millisecond] must be between 0 and 999.
  402. \end{description}
  403. \Errors
  404. In case one of the parameters is outside of it's valid range, 0 is returned.
  405. \SeeAlso
  406. \seef{EncodeDate}, \seep{DecodeTime}.
  407. \end{function}
  408. \latex{\inputlisting{sysutex/ex12.pp}}
  409. \html{\input{sysutex/ex12.tex}}
  410. \begin{function}{FileDateToDateTime}
  411. \Declaration
  412. Function FileDateToDateTime(Filedate : Longint) : TDateTime;
  413. \Description
  414. \var{FileDateToDateTime} converts the date/time encoded in \var{filedate}
  415. to a \var{TDateTime} encoded form. It can be used to convert date/time values
  416. returned by the \seef{FileAge} or \seef{FindFirst}/\seef{FindNext}
  417. functions to \var{TDateTime} form.
  418. \Errors
  419. None.
  420. \SeeAlso
  421. \seef{DateTimeToFileDate}
  422. \end{function}
  423. \latex{\inputlisting{sysutex/ex13.pp}}
  424. \html{\input{sysutex/ex13.tex}}
  425. \begin{function}{FormatDateTime}
  426. \Declaration
  427. Function FormatDateTime(FormatStr: string; DateTime: TDateTime):string;
  428. \Description
  429. \var{FormatDateTime} formats the date and time encoded in \var{DateTime}
  430. according to the formatting given in \var{FormatStr}. The complete list
  431. of formatting characters can be found in \sees{formatchars}.
  432. \Errors
  433. On error (such as an invalid character in the formatting string), and
  434. \var{EConvertError} exception is raised.
  435. \SeeAlso
  436. \seef{DateTimeToStr}, \seef{DateToStr}, \seef{TimeToStr},
  437. \seef{StrToDateTime}
  438. \end{function}
  439. \latex{\inputlisting{sysutex/ex14.pp}}
  440. \html{\input{sysutex/ex14.tex}}
  441. \begin{function}{IncMonth}
  442. \Declaration
  443. Function IncMonth(const DateTime: TDateTime; NumberOfMonths: integer): TDateTime;
  444. \Description
  445. \var{IncMonth} increases the month number in \var{DateTime} with
  446. \var{NumberOfMonths}. It wraps the result as to get a month between 1 and
  447. 12, and updates the year accordingly. \var{NumberOfMonths} can be negative,
  448. and can be larger than 12 (in absolute value).
  449. \Errors
  450. None.
  451. \SeeAlso
  452. \seef{Date}, \seef{Time}, \seef{Now}
  453. \end{function}
  454. \latex{\inputlisting{sysutex/ex15.pp}}
  455. \html{\input{sysutex/ex15.tex}}
  456. \begin{function}{IsLeapYear}
  457. \Declaration
  458. Function IsLeapYear(Year: Word): boolean;
  459. \Description
  460. \var{IsLeapYear} returns \var{True} if \var{Year} is a leap year,
  461. \var{False} otherwise
  462. \Errors
  463. None.
  464. \SeeAlso
  465. \seef{IncMonth}, \seef{Date}
  466. \end{function}
  467. \latex{\inputlisting{sysutex/ex16.pp}}
  468. \html{\input{sysutex/ex16.tex}}
  469. \begin{function}{MSecsToTimeStamp}
  470. \Declaration
  471. Function MSecsToTimeStamp(MSecs: Comp): TTimeStamp;
  472. \Description
  473. \var{MSecsTiTimeStamp} converts the given number of milliseconds to
  474. a \var{TTimeStamp} date/time notation.
  475. \Errors
  476. None.
  477. \SeeAlso
  478. \seef{TimeStampToMSecs}, \seef{DateTimeToTimeStamp},
  479. \end{function}
  480. \latex{\inputlisting{sysutex/ex17.pp}}
  481. \html{\input{sysutex/ex17.tex}}
  482. \begin{function}{Now}
  483. \Declaration
  484. Function Now: TDateTime;
  485. \Description
  486. \var{Now} returns the current date and time. It is equivalent to
  487. \var{Date+Time}.
  488. \Errors
  489. None.
  490. \SeeAlso
  491. \seef{Date}, \seef{Time}
  492. \end{function}
  493. \latex{\inputlisting{sysutex/ex18.pp}}
  494. \html{\input{sysutex/ex18.tex}}
  495. \begin{function}{StrToDate}
  496. \Declaration
  497. Function StrToDate(const S: string): TDateTime;
  498. \Description
  499. \var{StrToDate} converts the string \var{S} to a \var{TDateTime} date
  500. value. The Date must consist of 1 to three digits, separated by the
  501. \var{DateSeparator} character. If two numbers are given, they
  502. are supposed to form the day and month of the current year. If only
  503. one number is given, it is supposed to represent the day of the
  504. current month. (This is \em{not} supported in Delphi)
  505. The order of the digits (y/m/d, m/d/y, d/m/y) is determined from the
  506. \var{ShortDateFormat} variable.
  507. \Errors
  508. On error (e.g. an invalid date or invalid character),
  509. a \var{EConvertError} exception is raised.
  510. \SeeAlso
  511. \seef{StrToTime}, \seef{DateToStr}n \seef{TimeToStr}.
  512. \end{function}
  513. \latex{\inputlisting{sysutex/ex19.pp}}
  514. \html{\input{sysutex/ex19.tex}}
  515. \begin{function}{StrToDateTime}
  516. \Declaration
  517. Function StrToDateTime(const S: string): TDateTime;
  518. \Description
  519. \Errors
  520. \SeeAlso
  521. \end{function}
  522. \begin{function}{StrToTime}
  523. \Declaration
  524. Function StrToTime(const S: string): TDateTime;
  525. \Description
  526. \Errors
  527. \SeeAlso
  528. \end{function}
  529. \begin{function}{SystemTimeToDateTime}
  530. \Declaration
  531. Function SystemTimeToDateTime(const SystemTime: TSystemTime): TDateTime;
  532. \Description
  533. \Errors
  534. \SeeAlso
  535. \end{function}
  536. \begin{function}{Time}
  537. \Declaration
  538. Function Time: TDateTime;
  539. \Description
  540. \Errors
  541. \SeeAlso
  542. \end{function}
  543. \begin{function}{TimeStampToDateTime}
  544. \Declaration
  545. Function TimeStampToDateTime(const TimeStamp: TTimeStamp): TDateTime;
  546. \Description
  547. \Errors
  548. \SeeAlso
  549. \end{function}
  550. \begin{function}{TimeStampToMSecs}
  551. \Declaration
  552. Function TimeStampToMSecs(const TimeStamp: TTimeStamp): comp;
  553. \Description
  554. \Errors
  555. \SeeAlso
  556. \end{function}
  557. \begin{function}{TimeToStr}
  558. \Declaration
  559. Function TimeToStr(Time: TDateTime): string;
  560. \Description
  561. \Errors
  562. \SeeAlso
  563. \end{function}
  564. \section{Disk functions}
  565. \begin{function}{CreateDir}
  566. \Declaration
  567. Function CreateDir(Const NewDir : String) : Boolean;
  568. \Description
  569. \Errors
  570. \SeeAlso
  571. \end{function}
  572. \begin{function}{DiskFree}
  573. \Declaration
  574. Function DiskFree(Drive : Byte) : Longint;
  575. \Description
  576. \Errors
  577. \SeeAlso
  578. \end{function}
  579. \begin{function}{DiskSize}
  580. \Declaration
  581. Function DiskSize(Drive : Byte) : Longint;
  582. \Description
  583. \Errors
  584. \SeeAlso
  585. \end{function}
  586. \begin{function}{GetCurrentDir}
  587. \Declaration
  588. Function GetCurrentDir : String;
  589. \Description
  590. \Errors
  591. \SeeAlso
  592. \end{function}
  593. \begin{function}{RemoveDir}
  594. \Declaration
  595. Function RemoveDir(Const Dir : String) : Boolean;
  596. \Description
  597. \Errors
  598. \SeeAlso
  599. \end{function}
  600. \begin{function}{SetCurrentDir}
  601. \Declaration
  602. Function SetCurrentDir(Const NewDir : String) : Boolean;
  603. \Description
  604. \Errors
  605. \SeeAlso
  606. \end{function}
  607. \section{File handling functions}
  608. \begin{function}{ChangeFileExt}
  609. \Declaration
  610. Function ChangeFileExt(const FileName, Extension: string): string;
  611. \Description
  612. \Errors
  613. \SeeAlso
  614. \end{function}
  615. \begin{function}{DeleteFile}
  616. \Declaration
  617. Function DeleteFile(Const FileName : String) : Boolean;
  618. \Description
  619. \Errors
  620. \SeeAlso
  621. \end{function}
  622. \begin{procedure}{DoDirSeparators}
  623. \Declaration
  624. Procedure DoDirSeparators(Var FileName : String);
  625. \Description
  626. \Errors
  627. \SeeAlso
  628. \end{procedure}
  629. \begin{function}{ExpandFileName}
  630. \Declaration
  631. Function ExpandFileName(Const FileName : string): String;
  632. \Description
  633. \Errors
  634. \SeeAlso
  635. \end{function}
  636. \begin{function}{ExpandUNCFileName}
  637. \Declaration
  638. Function ExpandUNCFileName(Const FileName : string): String;
  639. \Description
  640. \Errors
  641. \SeeAlso
  642. \end{function}
  643. \begin{function}{ExtractFileDir}
  644. \Declaration
  645. Function ExtractFileDir(Const FileName : string): string;
  646. \Description
  647. \Errors
  648. \SeeAlso
  649. \end{function}
  650. \begin{function}{ExtractFileDrive}
  651. \Declaration
  652. Function ExtractFileDrive(const FileName: string): string;
  653. \Description
  654. \Errors
  655. \SeeAlso
  656. \end{function}
  657. \begin{function}{ExtractFileExt}
  658. \Declaration
  659. Function ExtractFileExt(const FileName: string): string;
  660. \Description
  661. \Errors
  662. \SeeAlso
  663. \end{function}
  664. \begin{function}{ExtractFileName}
  665. \Declaration
  666. Function ExtractFileName(const FileName: string): string;
  667. \Description
  668. \Errors
  669. \SeeAlso
  670. \end{function}
  671. \begin{function}{ExtractFilePath}
  672. \Declaration
  673. Function ExtractFilePath(const FileName: string): string;
  674. \Description
  675. \Errors
  676. \SeeAlso
  677. \end{function}
  678. \begin{function}{ExtractRelativepath}
  679. \Declaration
  680. Function ExtractRelativepath(Const BaseName,DestNAme : String): String;
  681. \Description
  682. \Errors
  683. \SeeAlso
  684. \end{function}
  685. \begin{function}{FileAge}
  686. \Declaration
  687. Function FileAge(Const FileName : String): Longint;
  688. \Description
  689. \Errors
  690. \SeeAlso
  691. \end{function}
  692. \begin{procedure}{FileClose}
  693. \Declaration
  694. Procedure FileClose(Handle : Longint);
  695. \Description
  696. \Errors
  697. \SeeAlso
  698. \end{procedure}
  699. \begin{function}{FileCreate}
  700. \Declaration
  701. Function FileCreate(Const FileName : String) : Longint;
  702. \Description
  703. \Errors
  704. \SeeAlso
  705. \end{function}
  706. \begin{function}{FileExists}
  707. \Declaration
  708. Function FileExists(Const FileName : String) : Boolean;
  709. \Description
  710. \Errors
  711. \SeeAlso
  712. \end{function}
  713. \begin{function}{FileGetAttr}
  714. \Declaration
  715. Function FileGetAttr(Const FileName : String) : Longint;
  716. \Description
  717. \Errors
  718. \SeeAlso
  719. \end{function}
  720. \begin{function}{FileGetDate}
  721. \Declaration
  722. Function FileGetDate(Handle : Longint) : Longint;
  723. \Description
  724. \Errors
  725. \SeeAlso
  726. \end{function}
  727. \begin{function}{FileOpen}
  728. \Declaration
  729. Function FileOpen(Const FileName : string; Mode : Integer) : Longint;
  730. \Description
  731. \Errors
  732. \SeeAlso
  733. \end{function}
  734. \begin{function}{FileRead}
  735. \Declaration
  736. Function FileRead(Handle : Longint; Var Buffer; Count : longint) : Longint;
  737. \Description
  738. \Errors
  739. \SeeAlso
  740. \end{function}
  741. \begin{function}{FileSearch}
  742. \Declaration
  743. Function FileSearch(Const Name, DirList : String) : String;
  744. \Description
  745. \Errors
  746. \SeeAlso
  747. \end{function}
  748. \begin{function}{FileSeek}
  749. \Declaration
  750. Function FileSeek(Handle,Offset,Origin : Longint) : Longint;
  751. \Description
  752. \Errors
  753. \SeeAlso
  754. \end{function}
  755. \begin{function}{FileSetAttr}
  756. \Declaration
  757. Function FileSetAttr(Const Filename : String; Attr: longint) : Longint;
  758. \Description
  759. \Errors
  760. \SeeAlso
  761. \end{function}
  762. \begin{function}{FileSetDate}
  763. \Declaration
  764. Function FileSetDate(Handle,Age : Longint) : Longint;
  765. \Description
  766. \Errors
  767. \SeeAlso
  768. \end{function}
  769. \begin{function}{FileTruncate}
  770. \Declaration
  771. Function FileTruncate(Handle,Size: Longint) : boolean;
  772. \Description
  773. \Errors
  774. \SeeAlso
  775. \end{function}
  776. \begin{function}{FileWrite}
  777. \Declaration
  778. Function FileWrite(Handle : Longint; Var Buffer; Count : Longint) : Longint;
  779. \Description
  780. \Errors
  781. \SeeAlso
  782. \end{function}
  783. \begin{procedure}{FindClose}
  784. \Declaration
  785. Procedure FindClose(Var F : TSearchrec);
  786. \Description
  787. \Errors
  788. \SeeAlso
  789. \end{procedure}
  790. \begin{function}{FindFirst}
  791. \Declaration
  792. Function FindFirst(Const Path : String; Attr : Longint; Var Rslt : TSearchRec) : Longint;
  793. \Description
  794. \Errors
  795. \SeeAlso
  796. \end{function}
  797. \begin{function}{FindNext}
  798. \Declaration
  799. Function FindNext(Var Rslt : TSearchRec) : Longint;
  800. \Description
  801. \Errors
  802. \SeeAlso
  803. \end{function}
  804. \begin{function}{GetDirs}
  805. \Declaration
  806. Function GetDirs(Var DirName : String; Var Dirs : Array of pchar) : Longint;
  807. \Description
  808. \Errors
  809. \SeeAlso
  810. \end{function}
  811. \begin{function}{RenameFile}
  812. \Declaration
  813. Function RenameFile(Const OldName, NewName : String) : Boolean;
  814. \Description
  815. \Errors
  816. \SeeAlso
  817. \end{function}
  818. \begin{function}{SetDirSeparators}
  819. \Declaration
  820. Function SetDirSeparators(Const FileName : String) : String;
  821. \Description
  822. \Errors
  823. \SeeAlso
  824. \end{function}
  825. \section{PChar functions}
  826. \begin{function}{StrAlloc}
  827. \Declaration
  828. Function StrAlloc(Size: cardinal): PChar;
  829. \Description
  830. \Errors
  831. \SeeAlso
  832. \end{function}
  833. \begin{function}{StrBufSize}
  834. \Declaration
  835. Function StrBufSize(var Str: PChar): cardinal;
  836. \Description
  837. \Errors
  838. \SeeAlso
  839. \end{function}
  840. \begin{procedure}{StrDispose}
  841. \Declaration
  842. Procedure StrDispose(var Str: PChar);
  843. \Description
  844. \Errors
  845. \SeeAlso
  846. \end{procedure}
  847. \begin{function}{StrPCopy}
  848. \Declaration
  849. Function StrPCopy(Dest: PChar; Source: string): PChar;
  850. \Description
  851. \Errors
  852. \SeeAlso
  853. \end{function}
  854. \begin{function}{StrPLCopy}
  855. \Declaration
  856. Function StrPLCopy(Dest: PChar; Source: string; MaxLen: cardinal): PChar;
  857. \Description
  858. \Errors
  859. \SeeAlso
  860. \end{function}
  861. \begin{function}{StrPas}
  862. \Declaration
  863. Function StrPas(Str: PChar): string;
  864. \Description
  865. \Errors
  866. \SeeAlso
  867. \end{function}
  868. \begin{function}{StrCat}
  869. \Declaration
  870. Function StrCat(dest,source : pchar) : pchar;
  871. \Description
  872. \Errors
  873. \SeeAlso
  874. \end{function}
  875. \begin{function}{StrComp}
  876. \Declaration
  877. Function StrComp(str1,str2 : pchar) : longint;
  878. \Description
  879. \Errors
  880. \SeeAlso
  881. \end{function}
  882. \begin{function}{StrCopy}
  883. \Declaration
  884. Function StrCopy(dest,source : pchar) : pchar;
  885. \Description
  886. \Errors
  887. \SeeAlso
  888. \end{function}
  889. \begin{function}{StrECopy}
  890. \Declaration
  891. Function StrECopy(dest,source : pchar) : pchar;
  892. \Description
  893. \Errors
  894. \SeeAlso
  895. \end{function}
  896. \begin{function}{StrEnd}
  897. \Declaration
  898. Function StrEnd(p : pchar) : pchar;
  899. \Description
  900. \Errors
  901. \SeeAlso
  902. \end{function}
  903. \begin{function}{StrIComp}
  904. \Declaration
  905. Function StrIComp(str1,str2 : pchar) : longint;
  906. \Description
  907. \Errors
  908. \SeeAlso
  909. \end{function}
  910. \begin{function}{StrLCat}
  911. \Declaration
  912. Function StrLCat(dest,source : pchar;l : longint) : pchar;
  913. \Description
  914. \Errors
  915. \SeeAlso
  916. \end{function}
  917. \begin{function}{StrLComp}
  918. \Declaration
  919. Function StrLComp(str1,str2 : pchar;l : longint) : longint;
  920. \Description
  921. \Errors
  922. \SeeAlso
  923. \end{function}
  924. \begin{function}{StrLCopy}
  925. \Declaration
  926. Function StrLCopy(dest,source : pchar;maxlen : longint) : pchar;
  927. \Description
  928. \Errors
  929. \SeeAlso
  930. \end{function}
  931. \begin{function}{StrLen}
  932. \Declaration
  933. Function StrLen(p : pchar) : longint;
  934. \Description
  935. \Errors
  936. \SeeAlso
  937. \end{function}
  938. \begin{function}{StrLIComp}
  939. \Declaration
  940. Function StrLIComp(str1,str2 : pchar;l : longint) : longint;
  941. \Description
  942. \Errors
  943. \SeeAlso
  944. \end{function}
  945. \begin{function}{StrLower}
  946. \Declaration
  947. Function strlower(p : pchar) : pchar;
  948. \Description
  949. \Errors
  950. \SeeAlso
  951. \end{function}
  952. \begin{function}{StrMove}
  953. \Declaration
  954. Function StrMove(dest,source : pchar;l : longint) : pchar;
  955. \Description
  956. \Errors
  957. \SeeAlso
  958. \end{function}
  959. \begin{function}{StrNew}
  960. \Declaration
  961. Function StrNew(p : pchar) : pchar;
  962. \Description
  963. \Errors
  964. \SeeAlso
  965. \end{function}
  966. \begin{function}{StrPos}
  967. \Declaration
  968. Function StrPos(str1,str2 : pchar) : pchar;
  969. \Description
  970. \Errors
  971. \SeeAlso
  972. \end{function}
  973. \begin{function}{StrRScan}
  974. \Declaration
  975. Function StrRScan(p : pchar;c : char) : pchar;
  976. \Description
  977. \Errors
  978. \SeeAlso
  979. \end{function}
  980. \begin{function}{StrScan}
  981. \Declaration
  982. Function StrScan(p : pchar;c : char) : pchar;
  983. \Description
  984. \Errors
  985. \SeeAlso
  986. \end{function}
  987. \begin{function}{StrUpper}
  988. \Declaration
  989. Function StrUpper(p : pchar) : pchar;
  990. \Description
  991. \Errors
  992. \SeeAlso
  993. \end{function}
  994. \section{String functions}
  995. \begin{function}{AdjustLineBreaks}
  996. \Declaration
  997. Function AdjustLineBreaks(const S: string): string;
  998. \Description
  999. \Errors
  1000. \SeeAlso
  1001. \end{function}
  1002. \begin{function}{AnsiCompareStr}
  1003. \Declaration
  1004. Function AnsiCompareStr(const S1, S2: string): integer;
  1005. \Description
  1006. \Errors
  1007. \SeeAlso
  1008. \end{function}
  1009. \begin{function}{AnsiCompareText}
  1010. \Declaration
  1011. Function AnsiCompareText(const S1, S2: string): integer;
  1012. \Description
  1013. \Errors
  1014. \SeeAlso
  1015. \end{function}
  1016. \begin{function}{AnsiExtractQuotedStr}
  1017. \Declaration
  1018. Function AnsiExtractQuotedStr(var Src: PChar; Quote: Char): string;
  1019. \Description
  1020. \Errors
  1021. \SeeAlso
  1022. \end{function}
  1023. \begin{function}{AnsiLastChar}
  1024. \Declaration
  1025. Function AnsiLastChar(const S: string): PChar;
  1026. \Description
  1027. \Errors
  1028. \SeeAlso
  1029. \end{function}
  1030. \begin{function}{AnsiLowerCase}
  1031. \Declaration
  1032. Function AnsiLowerCase(const s: string): string;
  1033. \Description
  1034. \Errors
  1035. \SeeAlso
  1036. \end{function}
  1037. \begin{function}{AnsiQuotedStr}
  1038. \Declaration
  1039. Function AnsiQuotedStr(const S: string; Quote: char): string;
  1040. \Description
  1041. \Errors
  1042. \SeeAlso
  1043. \end{function}
  1044. \begin{function}{AnsiStrComp}
  1045. \Declaration
  1046. Function AnsiStrComp(S1, S2: PChar): integer;
  1047. \Description
  1048. \Errors
  1049. \SeeAlso
  1050. \end{function}
  1051. \begin{function}{AnsiStrIComp}
  1052. \Declaration
  1053. Function AnsiStrIComp(S1, S2: PChar): integer;
  1054. \Description
  1055. \Errors
  1056. \SeeAlso
  1057. \end{function}
  1058. \begin{function}{AnsiStrLComp}
  1059. \Declaration
  1060. Function AnsiStrLComp(S1, S2: PChar; MaxLen: cardinal): integer;
  1061. \Description
  1062. \Errors
  1063. \SeeAlso
  1064. \end{function}
  1065. \begin{function}{AnsiStrLIComp}
  1066. \Declaration
  1067. Function AnsiStrLIComp(S1, S2: PChar; MaxLen: cardinal): integer;
  1068. \Description
  1069. \Errors
  1070. \SeeAlso
  1071. \end{function}
  1072. \begin{function}{AnsiStrLast}
  1073. \Declaration
  1074. Function AnsiStrLast(Str: PChar): PChar;
  1075. \Description
  1076. \Errors
  1077. \SeeAlso
  1078. \end{function}
  1079. \begin{function}{CharAnsiStrLower}
  1080. \Declaration
  1081. Function AnsiStrLower(Str: PChar): PChar;
  1082. \Description
  1083. \Errors
  1084. \SeeAlso
  1085. \end{function}
  1086. \begin{function}{AnsiStrUpper}
  1087. \Declaration
  1088. Function AnsiStrUpper(Str: PChar): PChar;
  1089. \Description
  1090. \Errors
  1091. \SeeAlso
  1092. \end{function}
  1093. \begin{function}{AnsiUpperCase}
  1094. \Declaration
  1095. Function AnsiUpperCase(const s: string): string;
  1096. \Description
  1097. \Errors
  1098. \SeeAlso
  1099. \end{function}
  1100. \begin{procedure}{AppendStr}
  1101. \Declaration
  1102. Procedure AppendStr(var Dest: PString; const S: string);
  1103. \Description
  1104. \Errors
  1105. \SeeAlso
  1106. \end{procedure}
  1107. \begin{procedure}{AssignStr}
  1108. \Declaration
  1109. Procedure AssignStr(var P: PString; const S: string);
  1110. \Description
  1111. \Errors
  1112. \SeeAlso
  1113. \end{procedure}
  1114. \begin{function}{BCDToInt}
  1115. \Declaration
  1116. Function BCDToInt(Value: integer): integer;
  1117. \Description
  1118. \Errors
  1119. \SeeAlso
  1120. \end{function}
  1121. \begin{function}{CompareMem}
  1122. \Declaration
  1123. Function CompareMem(P1, P2: Pointer; Length: cardinal): integer;
  1124. \Description
  1125. \Errors
  1126. \SeeAlso
  1127. \end{function}
  1128. \begin{function}{CompareStr}
  1129. \Declaration
  1130. Function CompareStr(const S1, S2: string): Integer;
  1131. \Description
  1132. \Errors
  1133. \SeeAlso
  1134. \end{function}
  1135. \begin{function}{CompareText}
  1136. \Declaration
  1137. Function CompareText(const S1, S2: string): integer;
  1138. \Description
  1139. \Errors
  1140. \SeeAlso
  1141. \end{function}
  1142. \begin{procedure}{DisposeStr}
  1143. \Declaration
  1144. Procedure DisposeStr(S: PString);
  1145. \Description
  1146. \Errors
  1147. \SeeAlso
  1148. \end{procedure}
  1149. \begin{function}{FloatToStr}
  1150. \Declaration
  1151. Function FloatToStr(Value: Extended): String;
  1152. \Description
  1153. \Errors
  1154. \SeeAlso
  1155. \end{function}
  1156. \begin{function}{FloatToStrF}
  1157. \Declaration
  1158. Function FloatToStrF(Value: Extended; format: TFloatFormat; Precision, Digits: Integer): String;
  1159. \Description
  1160. \Errors
  1161. \SeeAlso
  1162. \end{function}
  1163. \begin{procedure}{FmtStr}
  1164. \Declaration
  1165. Procedure (Var Res: String; Const Fmt : String; Const args: Array of const);
  1166. \Description
  1167. \Errors
  1168. \SeeAlso
  1169. \end{procedure}
  1170. \begin{function}{Format}
  1171. \Declaration
  1172. Function Format(Const Fmt : String; const Args : Array of const) : String;
  1173. \Description
  1174. \Errors
  1175. \SeeAlso
  1176. \end{function}
  1177. \begin{function}{FormatBuf}
  1178. \Declaration
  1179. Function FormatBuf(Var Buffer; BufLen : Cardinal; Const Fmt; fmtLen : Cardinal; Const Args : Array of const) : Cardinal;
  1180. \Description
  1181. \Errors
  1182. \SeeAlso
  1183. \end{function}
  1184. \begin{function}{IntToHex}
  1185. \Declaration
  1186. Function IntToHex(Value: integer; Digits: integer): string;
  1187. \Description
  1188. \Errors
  1189. \SeeAlso
  1190. \end{function}
  1191. \begin{function}{IntToStr}
  1192. \Declaration
  1193. Function IntToStr(Value: integer): string;
  1194. \Description
  1195. \Errors
  1196. \SeeAlso
  1197. \end{function}
  1198. \begin{function}{IsValidIdent}
  1199. \Declaration
  1200. Function IsValidIdent(const Ident: string): boolean;
  1201. \Description
  1202. \Errors
  1203. \SeeAlso
  1204. \end{function}
  1205. \begin{function}{LeftStr}
  1206. \Declaration
  1207. Function LeftStr(const S: string; Count: integer): string;
  1208. \Description
  1209. \Errors
  1210. \SeeAlso
  1211. \end{function}
  1212. \begin{function}{LoadStr}
  1213. \Declaration
  1214. Function LoadStr(Ident: integer): string;
  1215. \Description
  1216. \Errors
  1217. \SeeAlso
  1218. \end{function}
  1219. \begin{function}{LowerCase}
  1220. \Declaration
  1221. Function LowerCase(const s: string): string;
  1222. \Description
  1223. \Errors
  1224. \SeeAlso
  1225. \end{function}
  1226. \begin{function}{NewStr}
  1227. \Declaration
  1228. Function NewStr(const S: string): PString;
  1229. \Description
  1230. \Errors
  1231. \SeeAlso
  1232. \end{function}
  1233. \begin{function}{QuotedStr}
  1234. \Declaration
  1235. Function QuotedStr(const S: string): string;
  1236. \Description
  1237. \Errors
  1238. \SeeAlso
  1239. \end{function}
  1240. \begin{function}{RightStr}
  1241. \Declaration
  1242. Function RightStr(const S: string; Count: integer): string;
  1243. \Description
  1244. \Errors
  1245. \SeeAlso
  1246. \end{function}
  1247. \begin{function}{StrFmt}
  1248. \Declaration
  1249. Function StrFmt(Buffer,Fmt : PChar; Const args: Array of const) : Pchar;
  1250. \Description
  1251. \Errors
  1252. \SeeAlso
  1253. \end{function}
  1254. \begin{function}{StrLFmt}
  1255. \Declaration
  1256. Function StrLFmt(Buffer : PCHar; Maxlen : Cardinal;Fmt : PChar; Const args: Array of const) : Pchar;
  1257. \Description
  1258. \Errors
  1259. \SeeAlso
  1260. \end{function}
  1261. \begin{function}{StrToInt}
  1262. \Declaration
  1263. Function StrToInt(const s: string): integer;
  1264. \Description
  1265. \Errors
  1266. \SeeAlso
  1267. \end{function}
  1268. \begin{function}{StrToIntDef}
  1269. \Declaration
  1270. Function StrToIntDef(const S: string; Default: integer): integer;
  1271. \Description
  1272. \Errors
  1273. \SeeAlso
  1274. \end{function}
  1275. \begin{function}{Trim}
  1276. \Declaration
  1277. Function Trim(const S: string): string;
  1278. \Description
  1279. \Errors
  1280. \SeeAlso
  1281. \end{function}
  1282. \begin{function}{TrimLeft}
  1283. \Declaration
  1284. Function TrimLeft(const S: string): string;
  1285. \Description
  1286. \Errors
  1287. \SeeAlso
  1288. \end{function}
  1289. \begin{function}{TrimRight}
  1290. \Declaration
  1291. Function TrimRight(const S: string): string;
  1292. \Description
  1293. \Errors
  1294. \SeeAlso
  1295. \end{function}
  1296. \begin{function}{UpperCase}
  1297. \Declaration
  1298. Function UpperCase(const s: string): string;
  1299. \Description
  1300. \Errors
  1301. \SeeAlso
  1302. \end{function}