Sign in Join
FPDoc Onlineexperiment

sysutils unit

Various system utilities.

This documentation describes the sysutils unit. The sysutils unit was started by Gertjan Schouten, and completed by Michael Van Canneyt. It aims to be compatible to the Delphi sysutils unit, but in contrast with the latter, it is designed to work on multiple platforms. It is implemented on all supported platforms.

Classes and records

EAbortclassAbort error.
EAbstractErrorclassAbstract error.
EAccessViolationclassAccess Violation error.
EArgumentExceptionclassInvalid argument passed to a function.
EArgumentNilExceptionclassException raised when a required argument is Nil.
EArgumentOutOfRangeExceptionclassArgument out of valid range passed to a function.
EAssertionFailedclassAssertion failed error.
EBusErrorclassBus error exception.
ECFErrorclass
EControlCclassControl-C (abort) was pressed on the console.
EConvertErrorclassConversion error.
EDirectoryNotFoundExceptionclassException raised when a directory is not found.
EDivByZeroclassDivision by zero error.
EEncodingErrorclassException raised by the TEncoding class.
EExternalclassExternal Exception.
EExternalExceptionclassExternal exception.
EFileNotFoundExceptionclassException raised when a file is not found.
EFormatErrorclassFormatting error exception.
EHeapMemoryErrorclassHeap memory error.
EInOutArgumentExceptionclass
EInOutErrorclassInput/Output error.
EIntErrorclassInteger operation error.
EIntfCastErrorclassInvalid interface cast error.
EIntOverflowclassInteger overflow error.
EInvalidCastclassInvalid typecast error.
EInvalidContainerclassInvalid container error.
EInvalidInsertclassInvalid insert error.
EInvalidOpclassInvalid operation.
EInvalidOpExceptionclassInvalid operation exception.
EInvalidPointerclassInvalid pointer operation.
EListErrorclass
EMathErrorclassMathematical error.
EMonitorclass
EMonitorLockExceptionclass
ENoConstructExceptionclassError raised when instantiating a TCharacter class.
ENoDynLibsSupportclassNo dynamic library support.
ENoMonitorSupportExceptionclass
ENoThreadSupportclassNo Thread support error.
ENotImplementedclassException raised in case of a not implemented feature.
ENotSupportedExceptionclassException raised when a feature is not supported.
ENoWideStringSupportclassException raised if no widestring support is available in the executable.
EObjectCheckclassA Nil object reference was encountered.
EObjectDisposedclass
EOperationCancelledclass
EOSErrorclassOperating system error.
EOutOfMemoryclassOut of memory error.
EOverflowclassFloat overflow error.
EPackageErrorclassPackage error.
EPathNotFoundExceptionclassException raised when a path is not found.
EPathTooLongExceptionclassException raised when a path name is too long.
EPrivilegeclassPrivileged instruction error.
EProgrammerNotFoundclassDelphi compatibility exception.
EPropReadOnlyclassRead-only property error.
EPropWriteOnlyclassWrite-only property error.
ERangeErrorclassRange check error.
ESafecallExceptionclassSafeCall exception.
ESigQuitclassQuit signal was received.
EStackOverflowclassStack overflow error.
EThreadErrorclass
EUnderflowclassFloat underflow error.
EVariantErrorclassVariant error.
ExceptionclassBase class of all exceptions.
EZeroDivideclassDivision by zero error.
Int64RecrecordRecord describing an Int64 value.
IReadWriteSyncinterfaceRead/Write synchronizer.
LongRecrecordRecord describing a longint value.
OWordRecrecordIdentical to the Int128Rec record.
TAnsiStringBuilderclassAnsi-string version of string builder.
TAnsiStringHelperhelper
TBigEndianUnicodeEncodingclassBig-endian UTF-16 Unicode encoding.
TBoolean16Helperhelper
TBoolean32Helperhelper
TBoolean64Helperhelper
TBoolean8Helperhelper
TBooleanHelperhelperHelper for the Boolean type.
TByteBoolHelperhelperHelper for the ByteBool type.
TByteHelperhelperHelper for a byte-typed ordinal value.
TByteOverlayrecordHelper structure for quick data extraction from a byte-typed ordinal value.
TCardinalHelperhelperHelper for a Cardinal-typed ordinal value.
TCurrencyHelperhelper
TDateTimeInfoRecrecord
TDoubleHelperhelperHelper for Double floating point type.
TDwordOverlayrecordHelper structure for quick data extraction from a dword-typed ordinal value.
TEncodingclassEncoding support.
TExtendedHelperhelperHelper for Extended floating point type.
TFloatRecrecordRecord describing a float value.
TFormatSettingsrecordRecord with all the strings that determine formatting.
TGuidHelperhelperHelper type for TGUID.
TInt64HelperhelperHelper for a Int64-typed ordinal value.
TIntegerHelperhelperHelper for a Integer-typed ordinal value.
TLongBoolHelperhelperHelper for the LongBool type.
TLongIntHelperhelper
TMBCSEncodingclassMulti-Byte character set encoding.
TMREWExceptionclassException used in TMultiReadExclusiveWriteSynchronizer.
TMultiReadExclusiveWriteSynchronizerclassStandard implementation of a IReadWriteSync interface.
TNativeIntHelperhelperHelper for a NativeInt-typed ordinal value.
TNativeUIntHelperhelperHelper for a NativeUInt-typed ordinal value.
TOSVersionrecord
TQWordBoolHelperhelper
TQWordHelperhelperHelper for a QWord-typed ordinal value.
TQwordOverlayrecordHelper structure for quick data extraction from a qword-typed ordinal value.
TRawbyteSearchRecrecordRecord describing a search handle or result (single-byte string version).
TRawbyteSymLinkRecrecordSymlink information for OSes with single-byte filesystem API.
TRealHelperhelper
TShortIntHelperhelperHelper for a ShortInt-typed ordinal value.
TShortStringHelperhelper
TSimpleRWSyncclassRead/Write synchronizing object.
TSingleHelperhelperHelper for Single floating point type.
TSmallIntHelperhelperHelper for a SmallInt-typed ordinal value.
TStringHelperhelperHelper type for strings.
TSysLocalerecordType describing the current locale.
TSystemTimerecordSystem time structure.
TTimeStamprecordTimeStamp structure.
TUnicodeEncodingclassUTF-16 Unicode encoding.
TUnicodeSearchRecrecordUnicode searchrec record.
TUnicodeStringBuilderclassAnsi-string version of string builder.
TUnicodeStringHelperhelper
TUnicodeSymLinkRecrecordSymlink information for OSes with double-byte (widechar) filesystem API.
TUTF7EncodingclassUTF-7 Unicode encoding.
TUTF8EncodingclassUTF-8 Unicode encoding.
TWideStringHelperhelper
TWordBoolHelperhelperHelper for the WordBool type.
TWordHelperhelperHelper for a Word-typed ordinal value.
TWordOverlayrecordHelper structure for quick data extraction from a word-typed ordinal value.
WordRecrecordRecord describing a word value.

Procedures and functions

AbandonSignalHandlerprocedureAbandon the signal handler.
AbortprocedureAbort program execution.
AddDiskfunctionAdd a disk to the list of known disks (Unix only).
AddTerminateProcprocedureAdd a procedure to the exit chain.
AdjustLineBreaksfunctionConvert possible line-endings to the currently valid line ending.
AnsiCompareFileNamefunctionCompare 2 filenames.
AnsiCompareStrfunctionCompare 2 ansistrings, case sensitive, using locale settings.
AnsiCompareTextfunctionCompare 2 ansistrings, case insensitive, using locale settings.
AnsiDequotedStrfunctionExtract string without quotes.
AnsiExtractQuotedStrfunctionRemoves the first quoted string from a string.
AnsiLastCharfunctionReturn a pointer to the last character of a string.
AnsiLowerCasefunctionReturn a lowercase version of a string.
AnsiLowerCaseFileNamefunctionConvert filename to lowercase.
AnsiPosfunctionReturn Position of one ansistring in another.
AnsiQuotedStrfunctionReturn a quoted version of a string.
AnsiSameStrfunctionChecks whether 2 strings are the same (case sensitive).
AnsiSameTextfunctionChecks whether 2 strings are the same (case insensitive).
AnsiStrCompfunctionCompare two null-terminated strings. Case sensitive.
AnsiStrICompfunctionCompare two null-terminated strings. Case insensitive.
AnsiStrLastCharfunctionReturn a pointer to the last character of a string.
AnsiStrLCompfunctionCompare a limited number of characters of 2 strings.
AnsiStrLICompfunctionCompares a given number of characters of a string, case insensitive.
AnsiStrLowerfunctionConvert a null-terminated string to all-lowercase characters.
AnsiStrPosfunctionReturn position of one null-terminated substring in another.
AnsiStrRScanfunctionFind last occurrence of a character in a null-terminated string.
AnsiStrScanfunctionFind first occurrence of a character in a null-terminated string.
AnsiStrUpperfunctionConvert a null-terminated string to all-uppercase characters.
AnsiUpperCasefunctionReturn an uppercase version of a string, taking into account special characters.
AnsiUpperCaseFileNamefunctionConvert filename to uppercase.
AppendStrprocedureAppend one ansistring to another.
ApplicationNamefunctionReturn a default application name.
ArrayOfConstToStrfunction
ArrayOfConstToStrArrayfunction
AssignStrprocedureAssigns an ansistring to a null-terminated string.
BCDToIntfunctionConvert a BCD coded integer to a normal integer.
BeepprocedureSound the system bell.
BoolToStrfunctionConvert a boolean value to a string.
ByteLengthfunctionLength (in bytes) of a unicodestring.
BytesOffunctionReturn the bytes of a string in a TBytes array.
ByteToCharIndexfunctionConvert a character index in Bytes to an Index in characters.
ByteToCharLenfunctionConvert a length in bytes to a length in characters.
ByteTypefunctionReturn the type of byte in an ansistring for a multi-byte character set.
CallTerminateProcsfunctionCall the exit chain procedures.
ChangeFileExtfunctionChange the extension of a filename.
ChangeFilePathfunction
CharInSetfunctionCheck whether a char is in a set of characters.
CharToByteLenfunctionConvert a length in characters to a length in bytes.
CheckOSErrorprocedureCheck for OS error and raise exception.
CodePageNameToCodePagefunctionReturn a numeric identifier for the codepage.
CodePageToCodePageNamefunctionConvert a numeric codepage identifier to a codepage name.
CompareMemfunctionCompare two memory areas.
CompareMemRangefunctionCompare 2 memory locations.
CompareStrfunctionCompare 2 ansistrings case-sensitively, ignoring special characters.
CompareTextfunctionCompare 2 ansistrings case insensitive.
ComposeDateTimefunctionAdd a date and time.
ConcatPathsfunctionConcatenate an array of paths to form a single path.
CreateDirfunctionCreate a new directory.
CreateGUIDfunctionCreate a new GUID.
CurrentYearfunctionReturn the current year.
CurrToStrfunctionConvert a currency value to a string.
CurrToStrFfunctionFormat a currency to a string.
DatefunctionReturn the current date.
DateTimeToFileDatefunctionConvert a TDateTime value to a file age (integer).
DateTimeToStrfunctionConverts a TDateTime value to a string using a predefined format.
DateTimeToStringprocedureConverts a TDateTime value to a string with a given format.
DateTimeToSystemTimeprocedureConverts a TDateTime value to a systemtime structure.
DateTimeToTimeStampfunctionConverts a TDateTime value to a TimeStamp structure.
DateToStrfunctionConverts a TDateTime value to a date string with a predefined format.
DayOfWeekfunctionReturns the day of the week.
DecodeDateprocedureDecode a TDateTime to a year,month,day triplet.
DecodeDateFullyfunctionDecode a date with additional date of the week.
DecodeTimeprocedureDecode a TDateTime to a hour,minute,second,millisec quartet.
DeleteFilefunctionDelete a file from the file system.
DirectoryExistsfunctionCheck whether a directory exists in the file system.
DiskFreefunctionReturn the amount of free diskspace.
DiskSizefunctionReturn the total amount of diskspace.
DisposeStrprocedureDispose an ansistring from the heap.
DoDirSeparatorsprocedureConvert known directory separators to the current directory separator.
EncodeDatefunctionEncode a Year,Month,Day to a TDateTime value.
EncodeTimefunctionEncode a Hour,Min,Sec,millisec to a TDateTime value.
EnsureOrderfunction
ExceptAddrfunctionCurrent exception address.
ExceptFrameCountfunctionNumber of frames included in an exception backtrace.
ExceptFramesfunctionReturn the current exception stack frames.
ExceptionErrorMessagefunctionReturn a message describing the exception.
ExceptObjectfunctionCurrent Exception object.
Exchangefunction
ExcludeLeadingPathDelimiterfunctionStrip the leading path delimiter of a path.
ExcludeTrailingBackslashfunctionStrip trailing directory separator from a pathname, if needed.
ExcludeTrailingPathDelimiterfunctionStrip trailing directory separator from a pathname, if needed.
ExecuteProcessfunctionExecute another process (program).
ExeSearchfunctionSearch for an executable.
ExpandFileNamefunctionExpand a relative filename to an absolute filename.
ExpandFileNameCasefunctionExpand a filename entered as case insensitive to the full path as stored on the disk.
ExpandUNCFileNamefunctionExpand a relative filename to an absolute UNC filename.
Extractfunction
ExtractFileDirfunctionExtract the drive and directory part of a filename.
ExtractFileDrivefunctionExtract the drive part from a filename.
ExtractFileExtfunctionReturn the extension from a filename.
ExtractFileNamefunctionExtract the filename part from a full path filename.
ExtractFilePathfunctionExtract the path from a filename.
ExtractRelativePathfunctionExtract a relative path from a filename, given a base directory.
ExtractShortPathNamefunctionReturns a 8.3 path name.
FileAgefunctionReturn the timestamp of a file.
FileAgeUTCfunction
FileCloseprocedureClose a file handle.
FileCreatefunctionCreate a new file and return a handle to it.
FileDateToDateTimefunctionConvert a FileDate value to a TDateTime value.
FileDateToUniversalfunction
FileExistsfunctionCheck whether a particular file exists in the file system.
FileFlushfunctionSynchronize file contents to disk.
FileGetAttrfunctionReturn attributes of a file.
FileGetDatefunctionReturn the file time of an opened file.
FileGetDateTimeInfofunction
FileGetDateUTCfunction
FileGetSymLinkTargetfunctionGet the target filename and size of a symlink.
FileIsReadOnlyfunctionCheck whether a file is read-only.
FileOpenfunctionOpen an existing file and return a file handle.
FileReadfunctionRead data from a file handle in a buffer.
FileSearchfunctionSearch for a file in a path.
FileSeekfunctionSet the current file position on a file handle.
FileSetAttrfunctionSet the attributes of a file.
FileSetDatefunctionSet the date of a file.
FileSetDateUTCfunction
FileTruncatefunctionTruncate an open file to a given size.
FileWritefunctionWrite data from a buffer to a given file handle.
FindCloseprocedureClose a find handle.
FindCmdLineSwitchfunctionCheck whether a certain switch is present on the command-line.
FindFirstfunctionStart a file search and return a findhandle.
FindNextfunctionFind the next entry in a findhandle.
FloatToCurrfunctionConvert a float to a Currency value.
FloatToDateTimefunctionConvert a float to a TDateTime value.
FloatToDecimalprocedureConvert a float value to a TFloatRec value.
FloatToStrfunctionConvert a float value to a string using a fixed format.
FloatToStrFfunctionConvert a float value to a string using a given format.
FloatToTextfunctionReturn a string representation of a float, with a given format.
FloatToTextFmtfunctionConvert a float value to a string using a given mask.
FmtStrprocedureFormat a string with given arguments.
ForceDirectoriesfunctionCreate a chain of directories.
FormatfunctionFormat a string with given arguments.
FormatBuffunctionFormat a string with given arguments and store the result in a buffer.
FormatCurrfunctionFormat a currency.
FormatDateTimefunctionReturn a string representation of a TDateTime value with a given format.
FormatFloatfunctionFormat a float according to a certain mask.
FreeAndNilprocedureFree object if needed, and set object reference to Nil.
FreeMemAndNilprocedureFree the heap memory pointed to by a pointer and set pointer to nil.
GetAppConfigDirfunctionReturn the appropriate directory for the application's configuration files.
GetAppConfigFilefunctionReturn an appropriate name for an application configuration file.
GetCompiledArchitecturefunction
GetCompiledPlatformfunction
GetCurrentDirfunctionReturn the current working directory of the application.
GetDirsfunctionReturn a list of directory names from a path.
GetDriveIDFromLetterfunctionReturn the drive ID based on a drive letter.
GetEnvironmentStringfunctionReturn an environment variable by index.
GetEnvironmentVariablefunctionReturn the value of an environment variable.
GetEnvironmentVariableCountfunctionReturn the number of variables in the environment.
GetFileAsStringfunctionReturn the contents of a file as a string.
GetFileContentsfunctionReturn the contents of a file as an array of bytes.
GetFileHandlefunctionExtract OS handle from an untyped file or text file.
GetLastOSErrorfunctionReturn the last code from the OS.
GetLocalTimeprocedureGet the local time.
GetLocalTimeOffsetfunctionReturn local timezone offset.
GetModuleNamefunctionReturn the name of the current module.
GetTempDirfunctionReturn name of system's temporary directory.
GetTempFileNamefunctionReturn the name of a temporary file.
GetTickCountfunctionGet tick count (32-bit, deprecated).
GetTickCount64functionGet tick count (64-bit).
GetUniversalTimefunction
GetUserDirfunctionReturns the current user's home directory.
GuidCasefunctionReturn the index of a GUID in an array of GUID values.
GUIDToStringfunctionConvert a TGUID to a string representation.
HashNamefunctionCalculate a hash from a null-terminated string.
HookSignalprocedureHook a specified signal.
IfThenfunctionReturn one of two values depending on boolean condition.
IncAMonthprocedureIncrease a date with a certain amount of months.
IncludeLeadingPathDelimiterfunctionPrepend a path delimiter if there is not already one.
IncludeTrailingBackslashfunctionAdd trailing directory separator to a pathname, if needed.
IncludeTrailingPathDelimiterfunctionAdd trailing directory separator to a pathname, if needed.
IncMonthfunctionIncreases the month in a TDateTime value with a given amount.
InquireSignalfunctionCheck whether a signal handler is set (unix only).
IntToHexfunctionConvert an integer value to a hexadecimal string.
IntToStrfunctionConvert an integer value to a decimal string.
IsDelimiterfunctionCheck whether a given string is a delimiter character.
IsEqualGUIDfunctionCheck whether two TGUID variables are equal.
IsFileNameCasePreservingfunction
IsFileNameCaseSensitivefunction
IsLeadCharfunctionIs the character code the lead character of a multi-byte character.
IsLeapYearfunctionDetermine whether a year is a leap year.
IsPathDelimiterfunctionIs the character at the given position a pathdelimiter ?
IsValidIdentfunctionCheck whether a string is a valid identifier name.
LastDelimiterfunctionReturn the last occurrence of a set of delimiters in a string.
LeftStrfunctionReturn a number of characters starting at the left of a string.
ListIndexErrorprocedure
ListIndexErrorMsgfunction
LoadStrfunctionLoad a string from the resource tables.
LocalTimeToUniversalfunction
LowerCasefunctionReturn a lowercase version of a string.
MSecsToTimeStampfunctionConvert a number of milliseconds to a TDateTime value.
NewStrfunctionAllocate a new ansistring on the heap.
NowfunctionReturns the current date and time.
NowUTCfunction
OutOfMemoryErrorprocedureRaise an EOutOfMemory exception.
QuotedStrfunctionReturn a quotes version of a string.
RaiseLastOSErrorprocedureRaise an exception with the last Operating System error code.
RangeIndexErrorprocedure
RemoveDirfunctionRemove a directory from the file system.
RenameFilefunctionRename a file.
ReplaceDateprocedureReplace the date part of a date/time stamp.
ReplaceTimeprocedureReplace the time part.
RightStrfunctionReturn a number of characters from a string, starting at the end.
SafeFormatfunction
SafeLoadLibraryfunctionLoad a library safely.
SameFileNamefunctionAre two filenames referring to the same file ?
SameStrfunctionCheck whether 2 strings are the same, case insensitive.
SameTextfunctionChecks whether 2 strings are the same (case insensitive).
SetCurrentDirfunctionSet the current directory of the application.
SetDirSeparatorsfunctionSet the directory separators to the known directory separators.
ShowExceptionprocedureShow the current exception to the user.
SleepprocedureSuspend execution of a program for a certain time.
SScanffunctionScan a string for substrings and return the content of these substrings as typed values.
StrAllocfunctionAllocate a null-terminated string on the heap.
StrBufSizefunctionReturn the size of a null-terminated string allocated on the heap.
StrByteTypefunctionReturn the type of byte in a null-terminated string for a multi-byte character set.
strcatfunctionConcatenate 2 null-terminated strings.
StrCharLengthfunctionReturn the length of a null-terminated string in characters.
strcompfunctionCompare 2 null-terminated strings, case sensitive.
StrCopyfunctionCopy a null-terminated string.
StrDisposeprocedureDispose of a null-terminated string on the heap.
strecopyfunctionCopy a null-terminated string, return a pointer to the end.
strendfunctionReturn a pointer to the end of a null-terminated string.
StrFmtfunctionFormat a string with given arguments, store the result in a buffer.
stricompfunctionCompare 2 null-terminated strings, case insensitive.
StringOffunctionCreate a Unicode string from an array of bytes.
StringReplacefunctionReplace occurrences of one substring with another in a string.
StringToGUIDfunctionConvert a string to a native TGUID type.
strlcatfunctionConcatenate 2 null-terminated strings, with length boundary.
strlcompfunctionCompare limited number of characters of 2 null-terminated strings.
StrLCopyfunctionCopy a null-terminated string, limited in length.
StrLenfunctionLength of a null-terminated string.
StrLFmtfunctionFormat a string with given arguments, but with limited length.
strlicompfunctionCompare limited number of characters in 2 null-terminated strings, ignoring case.
strlowerfunctionConvert null-terminated string to all-lowercase.
StrMovefunctionMove a null-terminated string to new location.
strnewfunctionAllocate room for new null-terminated string.
StrNextCharfunctionReturns a pointer to the location of the next empty character in a null-terminated string.
StrPasfunctionConvert a null-terminated string to an ansistring.
StrPCopyfunctionCopy an ansistring to a null-terminated string.
StrPLCopyfunctionCopy a limited number of characters from an ansistring to a null-terminated string.
strposfunctionFind position of one null-terminated substring in another.
strrscanfunctionFind last occurrence of a character in a null-terminated string.
StrScanfunctionFind first occurrence of a character in a null-terminated string.
StrToBoolfunctionConvert a string to a boolean value.
StrToBoolDeffunctionConvert string to boolean value, returning default in case of error.
StrToCurrfunctionConvert a string to a currency value.
StrToCurrDeffunctionConvert a string to a currency value, using a default value.
StrToDatefunctionConvert a date string to a TDateTime value.
StrToDateDeffunctionConvert string to date, returning a default value.
StrToDateTimefunctionConvert a date/time string to a TDateTime value.
StrToDateTimeDeffunctionConvert string to date/time, returning a default value.
StrToDWordfunctionConvert string to DWord (cardinal).
StrToDWordDeffunctionConvert string to DWord (cardinal), using default.
StrToFloatfunctionConvert a string to a floating-point value.
StrToFloatDeffunctionConvert a string to a float, with a default value.
StrToIntfunctionConvert a string to an integer value.
StrToInt64functionConvert a string to an Int64 value.
StrToInt64DeffunctionConvert a string to an Int64 value, with a default value.
StrToIntDeffunctionConvert a string to an integer value, with a default value.
StrToQWordfunctionConvert a string to a QWord.
StrToQWordDeffunctionTry to convert a string to a QWord, returning a default value in case of failure.
StrToTimefunctionConvert a time string to a TDateTime value.
StrToTimeDeffunctionConvert string to time, returning a default value.
StrToUIntfunctionConvert a string to unsigned integer value.
StrToUInt64functionConvert a string to unsigned integer value.
StrToUInt64DeffunctionConvert a string to an unsigned 64-bit integer value, with a default value.
StrToUIntDeffunctionConvert a string to an unsigned integer value, with a default value.
strupperfunctionConvert null-terminated string to all-uppercase.
SupportsfunctionCheck whether a class or given interface supports an interface.
Swapprocedure
SysErrorMessagefunctionFormat a system error message.
SystemTimeToDateTimefunctionConvert a system time to a TDateTime value.
TextToFloatfunctionConvert a buffer to a float value.
TimefunctionReturns the current time.
TimeStampToDateTimefunctionConvert a TimeStamp value to a TDateTime value.
TimeStampToMSecsfunctionConverts a timestamp to a number of milliseconds.
TimeToStrfunctionConvert a TDateTime time to a string using a predefined format.
TrimfunctionTrim whitespace from the ends of a string.
TrimLeftfunctionTrim whitespace from the beginning of a string.
TrimRightfunctionTrim whitespace from the end of a string.
TryEncodeDatefunctionTry to encode a date, and indicate success.
TryEncodeTimefunctionTry to encode a time, and indicate success.
TryFloatToCurrfunctionTry to convert a float value to a currency value and report on success.
TryStringToGUIDfunctionTry to transform a string to a GUID.
TryStrToBoolfunctionTry to convert a string to a boolean value.
TryStrToCurrfunctionTry to convert a string to a currency.
TryStrToDatefunctionTry to convert a string with a date indication to a TDateTime value.
TryStrToDateTimefunctionTry to convert a string with date/time indication to a TDateTime value.
TryStrToDWordfunctionTry to convert a string to DWord (cardinal).
TryStrToFloatfunctionTry to convert a string to a float.
TryStrToIntfunctionTry to convert a string to an integer, and report on success.
TryStrToInt64functionTry to convert a string to an int64 value, and report on success.
TryStrToQWordfunctionTry to convert a string to a QWord value, and report on success.
TryStrToTimefunctionTry to convert a string with a time indication to a TDateTime value.
TryStrToUIntfunctionTry to convert a string to an unsigned integer, and report on success.
TryStrToUInt64functionTry to convert a string to an unsigned 64-bit integer, and report on success.
UIntToStrfunctionUnsigned integer to String.
UnhookSignalprocedureUnHook a specified signal.
UnicodeCompareStrfunctionCompare 2 Unicode strings.
UnicodeCompareTextfunctionCompare 2 strings case insensitively.
UnicodeFmtStrprocedureFormat a string with given arguments, procedural version.
UnicodeFormatfunctionFormat Unicode string.
UnicodeFormatBuffunctionFormat a Unicode string with given arguments and store the result in a unicodebuffer.
UnicodeLowerCasefunctionReturn lowercase version of a string.
UnicodeSameStrfunctionCheck whether 2 strings are equal.
UnicodeSameTextfunctionCheck whether 2 strings are the same, ignoring case.
UnicodeStringReplacefunctionReplace one occurrence of a string with another.
UnicodeUpperCasefunctionReturn uppercase version of a string.
UniversalTimeToLocalfunction
UniversalToFileDatefunction
UpperCasefunctionReturn an uppercase version of a string.
VendorNamefunctionReturn Application vendor Name.
WideBytesOffunctionReturns the contents of a widestring as an array of bytes.
WideCompareStrfunctionCompare two widestrings (case sensitive).
WideCompareTextfunctionCompare two widestrings (ignoring case).
WideFmtStrprocedureWidestring format.
WideFormatfunctionFormat a wide string.
WideFormatBuffunctionFormat widestring in a buffer.
WideLowerCasefunctionChange a widestring to all-lowercase.
WideSameStrfunctionCheck whether two widestrings are the same (case sensitive).
WideSameTextfunctionCheck whether two widestrings are the same (ignoring case).
WideStrAllocfunctionAllocate a null-terminated widestring on the heap.
WideStringOffunctionCreate Unicode string from array of bytes.
WideStringReplacefunctionReplace occurrences of one substring with another in a widestring.
WideUpperCasefunctionChange a widestring to all-uppercase.
WrapTextfunctionWord-wrap a text.

Types

EHeapExceptiontypeHeap exception.
ExceptClasstypeException Class reference.
Int128RectypeRecord representing a 128-bit unsigned integer.
nibbletypeHalf byte type.
PByteArraytypePointer to an array of byte.
PDayTabletypePointer to TDayTable type.
PStringtypePointer to a ansistring.
PSysCharSettypePointer to TSysCharSet type.
PWordarraytypePointer to an array of word.
TAnsiCharArraytype
TAnsiStringArraytype
TArchitecturesset
TBeepHandlerprocedure typeBeep handler prototype.
TByteArraytypeArray of bytes.
TByteBitIndextypeBit range for unsigned 8-bit integer types.
TByteNibbleIndextype
TBytestypeArray of byte.
TCardinalBitIndextypeBit range for unsigned 32-bit integer types.
TCardinalByteIndextype
TCardinalNibbleIndextype
TCardinalOverlaytypeHelper structure for quick data extraction from a cardinal-typed ordinal value.
TCardinalWordIndextype
TCharArraytypeArray of characters.
TCmdLineSwitchTypeenumeration
TCmdLineSwitchTypesset
TCompareOptiontypeString compare options.
TCompareOptionstypeSet of string compare options.
TCreateGUIDFuncprocedure typeCallback prototype to create GUIDs.
TDayTabletypeArray of day names.
TDelphiPlatformsset
TDwordBitIndextype
TDwordByteIndextype
TDwordNibbleIndextype
TDwordWordIndextype
TEndiantypeEndianness of a CPU.
TEventTypeenumerationLog event type.
TEventTypessetSet of TEventType.
TExecuteFlagssetFlags for ExecuteProcess.
TFileNametypeFilename type.
TFilenameCaseMatchenumerationType describing how ExpandFileNameCase found the resulting filename.
TFileRectypeRecord describing an untyped file.
TFileSearchOptionenumerationOptions for the FileSearch call.
TFileSearchOptionssetSet of TFileSearchOption.
TFloatFormatenumerationFormats for the FloatToText function.
TFloatValueenumerationType of float to return in the buffer for TextToFloat.
TFormatDateTimeOptionenumerationAdditional options for FormatDateTime.
TFormatDateTimeOptionssetSet of TFormatDateTimeOption.
TGetAppNameEventprocedure typeCallback type to get customized application name.
TGetTempDirEventprocedure typeFunction prototype for OnGetTempDir handler.
TGetTempFileEventprocedure typeFunction prototype for OnGetTempFile handler.
TGetVendorNameEventprocedure typePrototype for OnGetVendorName event.
THandletypeFile Handle type.
TInitFormatSettingsHookprocedure type
TInt64BitIndextypeBit range for 64-bit signed integer types.
TInt64ByteIndextype
TInt64DwordIndextype
TInt64NibbleIndextype
TInt64OverlaytypeHelper structure for quick data extraction from a int64-typed ordinal value.
TInt64WordIndextype
TIntegerSetsetSet with size of integer.
TLocaleOptionsenumerationWhat locale to use in string operations.
TLongIntBitIndextypeBit range for signed 32-bit signed integer types.
TLongIntByteIndextype
TLongIntNibbleIndextype
TLongIntOverlaytype
TLongIntWordIndextype
TMbcsByteTypeenumerationType of multi-byte character set.
TMonthNameArraytypeArray type for array of month variables.
TNativeIntBitIndextype
TNativeUIntBitIndextype
TNibbleBitIndextype
TPlatformsset
TProcedureprocedure typeProcedural type.
TQwordBitIndextypeBit range for unsigned 64-bit unsigned integer types.
TQwordByteIndextype
TQwordDwordIndextype
TQwordNibbleIndextype
TQwordWordIndextype
TReplaceFlagssetFlags for StringReplace function.
TSearchRectypeRecord describing a search handle or result.
TShortIntBitIndextypeBit range for signed 8-bit signed integer types.
TShortIntNibbleIndextype
TShortIntOverlaytypeHelper structure for quick data extraction from a shortint-typed ordinal value.
TShortStringArraytype
TSignalStateenumerationState of the signal handler (unix only).
TSmallIntBitIndextypeBit range for signed 32-bit signed integer types.
TSmallIntByteIndextype
TSmallIntNibbleIndextype
TSmallIntOverlaytypeHelper structure for quick data extraction from a smallint-typed ordinal value.
TStringArraytypeDynamic array of strings.
TStringBuildertype
TStringSplitOptionsenumerationString split options used in TStringHelper.Split.
TSymLinkRectypeSymlink information.
TSysCharSetsetSet of characters.
TTerminateProcprocedure typeTerminate procedure procedural variable.
TTextRectypeRecord describing a text file.
TUnicodeCharArraytypeArray of UnicodeChar.
TUnicodeStringArraytype
TUseBoolStrsenumerationUse boolean strings.
TUTF8StringDynArraytype
TWeekNameArraytypeArray of 7 Strings for week day names.
TWideCharArraytype
TWideStringArraytype
TWordArraytypeArray of word (Unsigned 16 bit integer).
TWordBitIndextypeBit range for unsigned 16-bit integer types.
TWordByteIndextype
TWordNibbleIndextype

Constants

ConfigExtensionconstantDefault application configuration file extension.
CPUEndianconstantCurrent CPU endianness.
DateDeltaconstantDays between 1/1/0001 and 12/31/1899.
DriveDelimconstantDrive letter delimiter.
EmptyStrconstantEmpty String Constant.
EmptyWideStrconstantEmpty wide string.
faAnyFileconstantMatch any file.
faArchiveconstantArchive bit is set.
faCompressedconstantCompressed file attribute.
faDirectoryconstantFile is a directory.
faEncryptedconstantEncrypted file attribute.
faHiddenconstantHidden file.
faNormalconstantNormal file attribute.
faReadOnlyconstantRead-Only file.
faSymLinkconstantFile is a symlink.
faSysFileconstantSystem file (Dos/Windows only).
faTemporaryconstantTemporary file attribute.
faVirtualconstantVirtual file attribute.
faVolumeIdconstantVolume id (Fat file system, Dos/Windows only).
feInvalidHandleconstantFileOpen error value.
fmOpenReadconstantOpen file in read-only mode.
fmOpenReadWriteconstantOpen file in read/write mode.
fmOpenWriteconstantOpen file in write-only mode.
fmShareCompatconstantOpen file in DOS share-compatibility mode.
fmShareDenyNoneconstantDo not lock file.
fmShareDenyReadconstantLock file so other processes cannot read.
fmShareDenyWriteconstantLock file so other processes can only read.
fmShareExclusiveconstantLock file for exclusive use.
fmShareNoLockingconstant
fsFromBeginningconstantStart seek operation from beginning of file.
fsFromCurrentconstantStart seek operation from current position in file.
fsFromEndconstantStart seek operation from end of file.
GUID_NULLconstantNULL GUID constant.
HexDisplayPrefixconstantString to prepend to hexadecimal values.
HoursPerDayconstantNumber of hours in a day.
INVALID_HANDLE_VALUEconstant
JulianEpochconstantStarting point of the Julian calendar.
LeadBytesconstantLead bytes in Multi-Byte character sets.
MAX_PATHconstantMaximum length of a fully qualified filename (including path).
MaxCurrencyconstantMaximum currency value.
MaxDateTimeconstantMaximum TDateTime value.
MB_ERR_INVALID_CHARSconstant
MinCurrencyconstantMinimum Currency value.
MinDateTimeconstantMinimum TDateTime value.
MinsPerDayconstantNumber of minutes per day.
MinsPerHourconstantNumber of minutes per hour.
MonthDaysconstantArray with number of days in the months for leap and non-leap years.
MSecsPerDayconstantNumber of milliseconds per day.
MSecsPerSecconstantNumber of milliseconds per second.
NullStrconstantPointer to an empty string.
PathDelimconstantPath (directory) delimiter.
PathSepconstantPath separator. (Separates paths in search path lists).
pfBCB4ProducedconstantNot used in Free Pascal.
pfDelphi4ProducedconstantNot used in Free Pascal.
pfDesignOnlyconstantPackage is a design-time only package.
pfExeModuleconstantPackage is an executable.
pfIgnoreDupUnitsconstantIgnore duplicate units in package.
pfLibraryModuleconstantPackage is a library.
pfModuleTypeMaskconstantMask for module type flags.
pfNeverBuildconstantNever-build flag was specified when compiling package.
pfPackageModuleconstantPackage is a real package (not exe).
pfProducerMaskconstantMask for producer flags.
pfProducerUndefinedconstantNot used in Free Pascal.
pfRunOnlyconstantPackage is a run-time only package.
pfV3ProducedconstantNot used in Free Pascal.
RTL_SIGBUSconstantBus error signal number (Unix only).
RTL_SIGDEFAULTconstantDefault signal handler (Unix only).
RTL_SIGFPEconstantFloating Point Error signal number (Unix only).
RTL_SIGILLconstantIllegal instruction signal number (Unix only).
RTL_SIGINTconstantINTERRUPT signal number (Unix only).
RTL_SIGLASTconstantLast signal number (Unix only).
RTL_SIGQUITconstantQUIT signal number (Unix only).
RTL_SIGSEGVconstantSegmentation fault signal number (Unix only).
SecsPerDayconstantNumber of seconds per day.
SecsPerHourconstantConstant indicating number of seconds in an hour.
SecsPerMinconstantNumber of seconds per minute.
SwitchCharsconstantCharacters which start a command-line switch.
SysConfigDirconstantSystem configuration directory.
ufImplicitUnitconstantUnit was implicitly imported into package (did not appear in package contains list).
ufMainUnitconstantUnit is the main unit of the package.
ufOrgWeakUnitconstantUnit is the original weak packaged unit.
ufPackageUnitconstantUnit is a packaged unit (appeared in package contains list).
ufWeakPackageUnitconstantWeak (original or not) packaged unit.
ufWeakUnitconstantUnit is a weak packaged unit.
UnixDateDeltaconstantNumber of days between 1.1.1900 and 1.1.1970.
UnixEpochconstantStarting point of the unix calendar (1/1/1970).

Variables

CurrencyDecimalsvariableNumber of decimals in currency amounts.
CurrencyFormatvariableFormat string for currencies.
CurrencyStringvariableName of currency.
DateSeparatorvariableDate separator character (subject to locale).
DecimalSeparatorvariableDecimal point separator.
DefaultFormatSettingsvariableStorage for default settings.
FalseBoolStrsvariableFalse Strings used in StrToBool conversion.
FormatSettingsvariableAlias for DefaultFormatSettings.
InitFormatSettingsHookvariable
ListSeparatorvariableSeparator character for lists.
LongDateFormatvariableLong date format string (subject to locale).
LongDayNamesvariableFull names of days.
LongMonthNamesvariableFull names of months.
LongTimeFormatvariableLong time format string (subject to locale).
NegCurrFormatvariableFormat string for negative currencies.
OnBeepvariableEvent called by Beep to actually implement beep.
OnCreateGUIDvariableCallback to create GUID values.
OnGetApplicationNamevariableCallback to get a customized application name.
OnGetTempDirvariableHandler for GetTempDir function.
OnGetTempFilevariableHandler for GetTempFileName function.
OnGetVendorNamevariableVendor name callback.
OnShowExceptionvariableCallback to show unhandled exceptions.
ShortDateFormatvariableShort Date Format string (subject to locale).
ShortDayNamesvariableNames of days, abbreviated form.
ShortMonthNamesvariableNames of months, abbreviated form.
ShortTimeFormatvariableShort time format string (subject to locale).
SysLocalevariableVariable with locale information.
ThousandSeparatorvariableThousand grouping character.
TimeAMStringvariableAM indicator string.
TimePMStringvariablePM indicator string.
TimeSeparatorvariableTime separator character.
TrueBoolStrsvariableTrue Strings used in StrToBool conversion.
TwoDigitYearCenturyWindowvariableWindow to determine what century 2 digit years are in.

Topics

ConversionRoutinestopicMiscellaneous conversion routines.
DateTimeRoutinestopicDate/time routines.
FileNameRoutinestopicFile Name handling routines.
FormatCharstopicDate and time formatting characters.
FormatStringstopicFormatting strings.
IORoutinestopicFile input/output routines.
LocalizationtopicLocalization support.
PCharFunctionstopicPChar related functions.
StringFunctionstopicString functions.
TypeHelperstopicType Helpers for basic types.
UnicodeAndCodePagestopicUnicode and codepage awareness.

Uses

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.