| Description | uses | Classes, Interfaces, Objects and Records | Functions and Procedures | Types | Constants | Variables |
| Name | Description |
|---|---|
Class EDateTimeParsingException |
function arrayAdd(var a: T__ArrayType__; const e: T__ElementType__):longint; overload; |
function arrayAdd(var a: T__ArrayType__; const a2: T__ArrayType__):longint; overload; |
function arrayDelete(var a: T__ArrayType__; const i: longint):T__ElementType__; overload; |
procedure arrayReserveFast(var a: T__ArrayType__; const len: longint; const reserveLength: longint); |
function arrayAddFast(var a: T__ArrayType__; var len: longint; const e: T__ElementType__): longint; |
function arrayDeleteFast(var a: T__ArrayType__; var len: longint; const i: longint):T__ElementType__; overload; |
function arrayIndexOf(const a: array of T__ElementType__; const e: T__ElementType__; slice1: integer = -1; slice2: integer = -1): integer; |
function arrayIndexOfSmallest(const a: array of T__ElementType__; slice1: integer = -1; slice2: integer = -1): integer; |
function arrayIndexOfLargest(const a: array of T__ElementType__; slice1: integer = -1; slice2: integer = -1): integer; |
procedure arrayInvert(a: T__ArrayType__; slice1: integer = -1;slice2: integer = -1); overload; |
function arraySlice(a: array of T__ElementType__; slice1: integer = -1;slice2: integer = -1): T__ArrayType__; |
function arrayGet(a: array of T__ElementType__; const i: integer): T__ElementType__; |
function arrayLast(a: array of T__ElementType__): T__ElementType__; |
function arrayLast(a: array of T__ElementType__; const default: T__ElementType__): T__ElementType__; |
function arrayCompare(a, b: array of T__ElementType__; slice1a: integer = -1; slice1b: integer = -1; slice2a: integer = -1; slice2b: integer = -1): longint; overload; |
function arrayEqual(a, b: array of T__ElementType__; slice1a: integer = -1; slice1b: integer = -1; slice2a: integer = -1; slice2b: integer = -1): boolean; overload; |
function unequal(const a, b: T__ElementType__): boolean; |
function unequal(const a, b, c: T__ElementType__): boolean; |
function unequal(const a: array of T__ElementType__): boolean; |
function procedureToMethod(proc: TProcedure): TMethod; |
procedure threadedCall(proc: TProcedureOfObject; finished: TNotifyEvent); overload; |
procedure threadedCall(proc: TProcedureOfObject; finished: TProcedureOfObject); overload; |
procedure threadedCall(proc: TProcedure; finished: TProcedureOfObject); overload; |
function strlmove(dest,source:pchar;destLen,sourceLen: longint):pchar; |
function widestrlmove(dest,source:pwidechar;destLen,sourceLen: longint):pwidechar; |
function strCopyFrom(const s:string; start:longint):string; inline; |
function strSlice(const first,last:pchar):string; |
function strSlice(const s:string; start,last:longint):string; |
function strlEqual(p1,p2:pchar;l1,l2: longint):boolean; |
function strliEqual(p1,p2:pchar;l1,l2: longint):boolean; |
function strlsEqual(p1,p2:pchar;l1,l2: longint):boolean; |
function strlsiEqual(p1,p2:pchar;l1,l2: longint):boolean; |
function strlEqual(p:pchar;const s:string; l: longint):boolean; |
function strliEqual(p:pchar;const s:string;l: longint):boolean; |
function strlBeginsWith(const p:pchar; l:longint; const expectedStart:string):boolean; |
function strliBeginsWith(const p:pchar;l: longint;const expectedStart:string):boolean; inline; |
function strEqual(const s1,s2:string):boolean; inline; |
function striEqual(const s1,s2:string):boolean; inline; |
function strBeginsWith(const strToBeExaminated,expectedStart:string):boolean; |
function striBeginsWith(const strToBeExaminated,expectedStart:string):boolean; |
function strBeginsWith(const p:pchar; const expectedStart:string):boolean; inline; |
function striBeginsWith(const p:pchar; const expectedStart:string):boolean; inline; |
function strEndsWith(const strToBeExaminated,expectedEnd:string):boolean; |
function striEndsWith(const strToBeExaminated,expectedEnd:string):boolean; |
function strCompareClever(const s1, s2: string): integer; |
function striCompareClever(const s1, s2: string): integer; inline; |
function strRpos(c:char;s:string):longint; |
function strlCount(const search:char; const searchIn:pchar; const len: longint): longint; |
function strlsIndexOf(str,searched:pchar; l1, l2: longint): longint; |
function strlsiIndexOf(str,searched:pchar; l1, l2: longint): longint; |
function strIndexOf(const str,searched:string):longint; inline; |
function striIndexOf(const str,searched:string):longint; inline; |
function strIndexOf(const str,searched:string; from: longint):longint; inline; |
function striIndexOf(const str,searched:string; from: longint):longint; inline; |
function strContains(const str,searched:string):boolean; inline; |
function striContains(const str,searched:string):boolean; inline; |
function strContains(const str,searched:string; from: longint):boolean; inline; |
function striContains(const str,searched:string; from: longint):boolean; inline; |
procedure strlTrimLeft(var p: pchar; var l: integer; const trimCharacters: TCharSet = [#0..' ']); |
procedure strlTrimRight(var p: pchar; var l: integer; const trimCharacters: TCharSet = [#0..' ']); |
procedure strlTrim(var p: pchar; var l: integer; const trimCharacters: TCharSet = [#0..' ']); |
function strTrimLeft(const s:string; const trimCharacters: TCharSet = [#0..' ']):string; inline; |
function strTrimRight(const s:string; const trimCharacters: TCharSet = [#0..' ']):string; inline; |
function strTrim(const s: string; const trimCharacters: TCharSet = [#0..' ']):string; inline; |
function strTrimAndNormalize(const s: string; const trimCharacters: TCharSet = [#0..' ']):string; |
function strSplitGet(const separator: string; var remainingPart: string):string; overload; |
procedure strSplit(out firstPart: string; const separator: string; var remainingPart: string); overload; |
procedure strSplit(out splitted: TStringArray;s:string;sep:string=',';includeEmpty:boolean=true); overload; |
function strSplit(s:string;sep:string=',';includeEmpty:boolean=true):TStringArray; overload; |
function strWrapSplit(const Line: string; MaxCol: Integer = 80; const BreakChars: TCharSet = [' ', #9]): TStringArray; |
function strWrap(const Line: string; MaxCol: Integer = 80; const BreakChars: TCharSet = [' ', #9]): string; |
function strSplitGetUntilBracketClosing(var text: string; const openBracket, closingBracket: string; updateText: boolean): string; |
function strSplitGetBetweenBrackets(var text: string; const openBracket, closingBracket: string; updateText: boolean): string; |
function strJoin(const sl: TStrings; const sep: string = ', '; limit: Integer=0; const limitStr: string='...'): string; overload; |
function strJoin(const sl: TStringArray; const sep: string = ', '; limit: Integer=0; const limitStr: string='...'): string; overload; |
function StrToBoolDef(const S: string;const Def:Boolean): Boolean; |
function strLoadFromFile(filename:string):string; |
procedure strSaveToFile(filename: string;str:string); |
function strLoadFromFileUTF8(filename:string):string; |
procedure strSaveToFileUTF8(filename: string;str:string); |
function strFromSIze(size: int64):string; |
function strLengthUtf8(str: string): longint; |
function strConvertToUtf8(str: string; from: TEncoding): string; |
function strConvertFromUtf8(const str: string; toe: TEncoding): string; |
function strChangeEncoding(const str: string; from,toe: TEncoding):string; |
function strGetUnicodeCharacter(const character: integer; encoding: TEncoding = eUTF8): string; |
function strDecodeUTF8Character(const str: string; var curpos: integer): integer; |
function strEncodingFromName(str:string):TEncoding; |
function strDecodeHTMLEntities(p:pchar;l:longint;encoding:TEncoding; strict: boolean = false):string; |
function strDecodeHTMLEntities(s:string;encoding:TEncoding; strict: boolean = false):string; |
function strEscape(const s:string; const toEscape: TCharSet; escapeChar: char = '\'): string; |
function strEscapeRegex(const s:string): string; |
function strDecodeHex(const s:string):string; |
function strEncodeHex(const s:string; const code: string = '0123456789ABCDEF'):string; |
function strFromPchar(p:pchar;l:longint):string; |
function strFromPtr(p: pointer): string; |
function strFromInt(i: int64; displayLength: longint): string; |
function strDup(const rep: string; const count: integer): string; |
function intLog10(i:longint):longint; overload; |
function intLog(n,b: longint): longint; overload; |
procedure intFactor(n,p: longint; out e, r:longint); |
function gcd(a,b: cardinal): cardinal; |
function coprime(a,b:cardinal): boolean; |
function modPow(i, e, m: T__INT__NUMBER__): T__INT__NUMBER__; |
function intBound(min, i, max: T__INT__NUMBER__): T__INT__NUMBER__; |
function factorial(i:longint):float; |
function binomial(n,k: longint): float; |
function binomialExpectation(n:longint;p:float):float; |
function binomialVariance(n:longint;p:float):float; |
function binomialDeviation(n:longint;p:float):float; |
function binomialProbability(n:longint;p:float;k:longint):float; |
function binomialProbabilityGE(n:longint;p:float;k:longint):float; |
function binomialProbabilityLE(n:longint;p:float;k:longint):float; |
function binomialProbabilityDeviationOf(n:longint;p:float;dif:float):float; |
function binomialProbabilityApprox(n:longint;p:float;k:longint):float; |
function binomialZScore(n:longint;p:float;k:longint):float; |
procedure intSieveEulerPhi(n: integer; var totient: TLongintArray); |
procedure intSieveDivisorCount(n: integer; var divcount: TLongintArray); |
function dateWeekOfYear(const date:TDateTime):word; |
function dateIsLeapYear(const year: integer): boolean; inline; |
function dateTimeParsePartsTry(const input,mask:string; outYear, outMonth, outDay: PInteger; outHour, outMinutes, outSeconds: PInteger; outSecondFraction: PDouble = nil; outtimezone: PDateTime = nil): boolean; |
procedure dateTimeParseParts(const input,mask:string; outYear, outMonth, outDay: PInteger; outHour, outMinutes, outSeconds: PInteger; outSecondFraction: PDouble = nil; outtimezone: PDateTime = nil); |
function dateTimeFormat(const mask: string; y, m,d, h, n, s: Integer; const secondFraction: double = 0; const timezone: TDateTime = Nan): string; |
function dateTimeFormat(const mask: string; const dateTime: TDateTime): string; |
function dateTimeEncode(const y,m,d,h,n,s:integer; const secondFraction: double = 0): TDateTime; |
procedure timeParseParts(const input,mask:string; outHour, outMinutes, outSeconds: PInteger; outSecondFraction: PDouble = nil; outtimezone: PDateTime = nil); |
function timeParse(const input,mask:string): TTime; |
function timeFormat(const mask: string; const h, n, s: integer; const secondFraction: double = 0; const timezone: TDateTime = Nan): string; |
procedure dateParseParts(const input,mask:string; outYear, outMonth, outDay: PInteger; outtimezone: PDateTime = nil); |
function dateParse(const input,mask:string): longint; |
function dateFormat(const mask: string; const y, m, d: integer; const timezone: TDateTime = nan): string; |
function dateEncodeTry(year, month, day: integer; out dt: TDateTime): boolean; |
function dateEncode(year, month, day: integer): TDateTime; |
procedure dateDecode(date: TDateTime; year, month, day: PInteger); |
procedure stableSort(a,b: pointer; size: longint; compareFunction: TPointerCompareFunction = nil; compareFunctionData: TObject=nil); |
procedure stableSort(intArray: TLongintArray; compareFunction: TPointerCompareFunction; compareFunctionData: TObject=nil); |
TStringArray=array of string; |
TLongintArray =array of longint; |
TLongwordArray =array of longword; |
TInt64Array =array of int64; |
TFloatArray =array of float; |
T__ArrayType__ = TStringArray; |
T__ElementType__ = string; |
T__INT__NUMBER__ = integer; |
TProcedureOfObject = procedure () of object; |
TEncoding = (...); |
TCharSet = set of char; |
TPointerCompareFunction = function (data: TObject; a, b: pointer): longint; |
__ELEMENT__DEFAULT__: T__ElementType__ = ''; |
powersOf10: array[0..10] of longint = (1,10,100,1000,10000,100000,1000000,1000000,10000000,100000000,1000000000); |
DateMonthDaysCumSum: array[false..true,0..12] of Cardinal =
((00, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365),
(00, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366)); |
WHITE_SPACE=[#9,#10,#13,' ']; |
function arrayAdd(var a: T__ArrayType__; const e: T__ElementType__):longint; overload; |
|
Adds element |
function arrayAdd(var a: T__ArrayType__; const a2: T__ArrayType__):longint; overload; |
|
Adds elements from a2 |
function arrayDelete(var a: T__ArrayType__; const i: longint):T__ElementType__; overload; |
|
Removes element at position i from a (destroying the order of the elements) |
procedure arrayReserveFast(var a: T__ArrayType__; const len: longint; const reserveLength: longint); |
|
Ensures that |
function arrayAddFast(var a: T__ArrayType__; var len: longint; const e: T__ElementType__): longint; |
|
returns i with a[i]=e |
function arrayDeleteFast(var a: T__ArrayType__; var len: longint; const i: longint):T__ElementType__; overload; |
|
Removes element at position i from a (destroying the order of the elements) |
function arrayIndexOf(const a: array of T__ElementType__; const e: T__ElementType__; slice1: integer = -1; slice2: integer = -1): integer; |
|
Find element e in the array/slice (see above) |
function arrayIndexOfSmallest(const a: array of T__ElementType__; slice1: integer = -1; slice2: integer = -1): integer; |
|
Find the smallest element, in the array/slice (see above) |
function arrayIndexOfLargest(const a: array of T__ElementType__; slice1: integer = -1; slice2: integer = -1): integer; |
|
Find the largest element in the array/slice (see above) |
procedure arrayInvert(a: T__ArrayType__; slice1: integer = -1;slice2: integer = -1); overload; |
|
Inverts the order of the elements in the array/slice (see above) |
function arraySlice(a: array of T__ElementType__; slice1: integer = -1;slice2: integer = -1): T__ArrayType__; |
|
Extracts a array slice |
function arrayGet(a: array of T__ElementType__; const i: integer): T__ElementType__; |
|
Returns the i-th element of the array. If i < 0, the indices are taken from the end of the array. (which is actually the only use case) |
function arrayLast(a: array of T__ElementType__): T__ElementType__; |
|
Returns the last element of the array, raises exception, iff the array is empty |
function arrayLast(a: array of T__ElementType__; const default: T__ElementType__): T__ElementType__; |
|
Returns the last element of the array, returns default, iff the array is empty |
function arrayCompare(a, b: array of T__ElementType__; slice1a: integer = -1; slice1b: integer = -1; slice2a: integer = -1; slice2b: integer = -1): longint; overload; |
|
Compares two array/slices (interleaved slice parameters, so arrayEqual(a,b,3,3) compares the first 3 elements) |
function arrayEqual(a, b: array of T__ElementType__; slice1a: integer = -1; slice1b: integer = -1; slice2a: integer = -1; slice2b: integer = -1): boolean; overload; |
|
Tests if two array/slices are equal (interleaved slice parameters, so |
function unequal(const a, b: T__ElementType__): boolean; |
|
Checks if all elements are pairwise unequal |
function unequal(const a, b, c: T__ElementType__): boolean; |
|
Checks if all elements are pairwise unequal |
function unequal(const a: array of T__ElementType__): boolean; |
|
Checks if all elements are pairwise unequal |
function procedureToMethod(proc: TProcedure): TMethod; |
procedure threadedCall(proc: TProcedureOfObject; finished: TNotifyEvent); overload; |
|
Calls proc in an new thread |
procedure threadedCall(proc: TProcedureOfObject; finished: TProcedureOfObject); overload; |
|
Calls proc in an new thread |
procedure threadedCall(proc: TProcedure; finished: TProcedureOfObject); overload; |
|
Calls proc in an new thread |
function strlmove(dest,source:pchar;destLen,sourceLen: longint):pchar; |
|
Copies min(sourceLen, destLen) characters from source to dest and returns dest |
function widestrlmove(dest,source:pwidechar;destLen,sourceLen: longint):pwidechar; |
|
Copies min(sourceLen, destLen) characters from source to dest and returns dest |
function strCopyFrom(const s:string; start:longint):string; inline; |
|
Returns the substring of s containing all characters after start (including s[start] |
function strSlice(const first,last:pchar):string; |
|
Returns a string with all characters between first and last (including first, last) |
function strSlice(const s:string; start,last:longint):string; |
|
Returns a string with all characters between start and last (including start, last) |
function strlEqual(p1,p2:pchar;l1,l2: longint):boolean; |
|
Tests if the strings are case-sensitive equal (same length and same characters) (null-terminated, stops comparison when meeting #0 ) |
function strliEqual(p1,p2:pchar;l1,l2: longint):boolean; |
|
Tests if the strings are case-insensitive equal (same length and same characters) (null-terminated, stops comparison when meeting #0 ) |
function strlsEqual(p1,p2:pchar;l1,l2: longint):boolean; |
|
Tests if the strings are case-sensitive equal (same length and same characters) (strict-length, can continue comparison after #0) |
function strlsiEqual(p1,p2:pchar;l1,l2: longint):boolean; |
|
Tests if the strings are case-insensitive equal (same length and same characters) (strict-length, can continue comparison after #0) |
function strlEqual(p:pchar;const s:string; l: longint):boolean; |
|
Tests if the strings are case-sensitive equal (same length and same characters) |
function strliEqual(p:pchar;const s:string;l: longint):boolean; |
|
Tests if the strings are case-insensitive equal (same length and same characters) |
function strlBeginsWith(const p:pchar; l:longint; const expectedStart:string):boolean; |
|
Test if p begins with expectedStart (__STRICT_HELP__, case-sensitive) |
function strliBeginsWith(const p:pchar;l: longint;const expectedStart:string):boolean; inline; |
|
Test if p begins with expectedStart (__STRICT_HELP__, case-insensitive) |
function strEqual(const s1,s2:string):boolean; inline; |
|
Tests if the strings are case-insensitive equal (same length and same characters) |
function striEqual(const s1,s2:string):boolean; inline; |
|
Tests if the strings are case-insensitive equal (same length and same characters) |
function strBeginsWith(const strToBeExaminated,expectedStart:string):boolean; |
|
Tests if the |
function striBeginsWith(const strToBeExaminated,expectedStart:string):boolean; |
|
Tests if the |
function strBeginsWith(const p:pchar; const expectedStart:string):boolean; inline; |
|
Tests if the |
function striBeginsWith(const p:pchar; const expectedStart:string):boolean; inline; |
|
Tests if the |
function strEndsWith(const strToBeExaminated,expectedEnd:string):boolean; |
|
Tests if the |
function striEndsWith(const strToBeExaminated,expectedEnd:string):boolean; |
|
Tests if the |
function strCompareClever(const s1, s2: string): integer; |
|
Case sensitive, clever comparison, that basically splits the string into lexicographical and numerical parts and compares them accordingly |
function strRpos(c:char;s:string):longint; |
|
Searchs the last index of c in s |
function strlCount(const search:char; const searchIn:pchar; const len: longint): longint; |
|
Counts all occurrences of search in searchIn (case sensitive, stops at #0) |
function strlsIndexOf(str,searched:pchar; l1, l2: longint): longint; |
|
Searchs |
function strlsiIndexOf(str,searched:pchar; l1, l2: longint): longint; |
|
Searchs |
function strIndexOf(const str,searched:string):longint; inline; |
|
Searchs |
function striIndexOf(const str,searched:string):longint; inline; |
|
Searchs |
function strIndexOf(const str,searched:string; from: longint):longint; inline; |
|
Searchs |
function striIndexOf(const str,searched:string; from: longint):longint; inline; |
|
Searchs |
function strContains(const str,searched:string):boolean; inline; |
|
Tests if |
function striContains(const str,searched:string):boolean; inline; |
|
Tests if |
function strContains(const str,searched:string; from: longint):boolean; inline; |
|
Tests if |
function striContains(const str,searched:string; from: longint):boolean; inline; |
|
Tests if |
procedure strlTrimLeft(var p: pchar; var l: integer; const trimCharacters: TCharSet = [#0..' ']); |
|
Removes all occurrences of trimCharacter from the left/right side of the string |
procedure strlTrimRight(var p: pchar; var l: integer; const trimCharacters: TCharSet = [#0..' ']); |
|
Removes all occurrences of trimCharacter from the left/right side of the string |
procedure strlTrim(var p: pchar; var l: integer; const trimCharacters: TCharSet = [#0..' ']); |
|
Removes all occurrences of trimCharacter from the left/right side of the string |
function strTrimLeft(const s:string; const trimCharacters: TCharSet = [#0..' ']):string; inline; |
|
Removes all occurrences of trimCharacter from the left/right side of the string |
function strTrimRight(const s:string; const trimCharacters: TCharSet = [#0..' ']):string; inline; |
function strTrim(const s: string; const trimCharacters: TCharSet = [#0..' ']):string; inline; |
function strTrimAndNormalize(const s: string; const trimCharacters: TCharSet = [#0..' ']):string; |
procedure strSplit(out splitted: TStringArray;s:string;sep:string=',';includeEmpty:boolean=true); overload; |
|
Splits the string s into the array splitted at every occurrence of sep |
function strSplit(s:string;sep:string=',';includeEmpty:boolean=true):TStringArray; overload; |
|
Splits the string s into the array splitted at every occurrence of sep |
function strWrapSplit(const Line: string; MaxCol: Integer = 80; const BreakChars: TCharSet = [' ', #9]): TStringArray; |
function strWrap(const Line: string; MaxCol: Integer = 80; const BreakChars: TCharSet = [' ', #9]): string; |
function strSplitGetUntilBracketClosing(var text: string; const openBracket, closingBracket: string; updateText: boolean): string; |
function strSplitGetBetweenBrackets(var text: string; const openBracket, closingBracket: string; updateText: boolean): string; |
function strJoin(const sl: TStringArray; const sep: string = ', '; limit: Integer=0; const limitStr: string='...'): string; overload; |
|
Joins all string list items to a single string separated by |
function StrToBoolDef(const S: string;const Def:Boolean): Boolean; |
|
Converts a str to a bool (for fpc versions previous 2.2) |
function strLoadFromFile(filename:string):string; |
|
loads a file as string. The filename is directly passed to the fpc rtl and uses the system encoding See also |
procedure strSaveToFile(filename: string;str:string); |
|
saves a string as file. The filename is directly passed to the fpc rtl and uses the system encoding See also |
function strLoadFromFileUTF8(filename:string):string; |
|
loads a file as string. The filename should be encoded in utf-8 See also |
procedure strSaveToFileUTF8(filename: string;str:string); |
|
saves a string as file. The filename should be encoded in utf-8 See also |
function strFromSIze(size: int64):string; |
|
converts a size (measured in bytes) to a string (e.g. 1025 -> 1 KiB) |
function strConvertToUtf8(str: string; from: TEncoding): string; |
|
Returns a utf-8 string from the string in encoding |
function strConvertFromUtf8(const str: string; toe: TEncoding): string; |
|
Converts a utf-8 string to the encoding |
function strChangeEncoding(const str: string; from,toe: TEncoding):string; |
|
Changes the string encoding from |
function strGetUnicodeCharacter(const character: integer; encoding: TEncoding = eUTF8): string; |
|
Get unicode character |
function strEncodingFromName(str:string):TEncoding; |
|
Gets the encoding from an encoding name (e.g. from http-equiv) |
function strDecodeHTMLEntities(p:pchar;l:longint;encoding:TEncoding; strict: boolean = false):string; |
|
This decodes all html entities to the given encoding. If strict is not set it will ignore wrong entities (so e.g. X&Y will remain X&Y and you can call the function even if it contains rogue &). |
function strDecodeHTMLEntities(s:string;encoding:TEncoding; strict: boolean = false):string; |
|
This decodes all html entities to the given encoding. If strict is not set it will ignore wrong entities (so e.g. X&Y will remain X&Y and you can call the function even if it contains rogue &). |
function strEscape(const s:string; const toEscape: TCharSet; escapeChar: char = '\'): string; |
|
Replace all occurences of x \in toEscape with escapeChar + x |
function strEscapeRegex(const s:string): string; |
|
Returns a regex matching s |
function strDecodeHex(const s:string):string; |
function strEncodeHex(const s:string; const code: string = '0123456789ABCDEF'):string; |
function strFromPchar(p:pchar;l:longint):string; |
|
Returns the first l bytes of p (copies them so O(n)) |
function strFromPtr(p: pointer): string; |
|
Creates a string to display the value of a pointer (e.g. 0xDEADBEEF) |
function strDup(const rep: string; const count: integer): string; |
|
Creates count copies of rep |
function intLog10(i:longint):longint; overload; |
|
log 10 rounded down (= number of digits in base 10 - 1) |
function intLog(n,b: longint): longint; overload; |
|
log_b n rounded down (= number of digits of n in base b - 1) |
procedure intFactor(n,p: longint; out e, r:longint); |
|
Given a number n, this procedure calculates the maximal integer e, so that n = pˆe * r |
function gcd(a,b: cardinal): cardinal; |
|
Calculates the greatest common denominator |
function coprime(a,b:cardinal): boolean; |
|
Checks if two numbers are |
function modPow(i, e, m: T__INT__NUMBER__): T__INT__NUMBER__; |
|
Calculates iˆe mod m in O(log(e)) and never exceeding m |
function intBound(min, i, max: T__INT__NUMBER__): T__INT__NUMBER__; |
function factorial(i:longint):float; |
|
Calculates i! |
function binomial(n,k: longint): float; |
|
Calculates n|k = n!/k!(n-k)! |
function binomialExpectation(n:longint;p:float):float; |
|
expectated value of a binomial distribution |
function binomialVariance(n:longint;p:float):float; |
|
variance of a binomial distribution |
function binomialDeviation(n:longint;p:float):float; |
|
deviation(=sqrt(variance)) of a binomial distribution |
function binomialProbability(n:longint;p:float;k:longint):float; |
|
probability: P(X = k) where X is binomial distributed with n possible values (exact value calculated with binomial coefficients, ) See also |
function binomialProbabilityGE(n:longint;p:float;k:longint):float; |
|
probability: P(X >= k) where X is binomial distributed with n possible values |
function binomialProbabilityLE(n:longint;p:float;k:longint):float; |
|
probability: P(X <= k) where X is binomial distributed with n possible values |
function binomialProbabilityDeviationOf(n:longint;p:float;dif:float):float; |
|
probability: P(X >= mu + d or X <= mu - d) where X is binomial distributed with n possible values |
function binomialProbabilityApprox(n:longint;p:float;k:longint):float; |
|
expectated value of a binomial distribution (approximates the value with either Poisson or Moivre and Laplace, depending on the variance of the distribution) ) See also |
function binomialZScore(n:longint;p:float;k:longint):float; |
|
Z-Score of the value k in a distribution with n outcomes |
procedure intSieveEulerPhi(n: integer; var totient: TLongintArray); |
|
This calculates the euler phi function totient[i] := phi(i) = |{1 <= j <= i | gcd(i,j) = 0}| for all i <= n. |
procedure intSieveDivisorCount(n: integer; var divcount: TLongintArray); |
|
This calculates the number of divisors: divcount[i] := |{1 <= j <= i | i mod j = 0}| for all i <= n. |
function dateWeekOfYear(const date:TDateTime):word; |
|
Week of year |
function dateIsLeapYear(const year: integer): boolean; inline; |
Returnsif year is a leap year (supports negative years, i think) |
procedure dateTimeParseParts(const input,mask:string; outYear, outMonth, outDay: PInteger; outHour, outMinutes, outSeconds: PInteger; outSecondFraction: PDouble = nil; outtimezone: PDateTime = nil); |
|
Reads date/time parts from a input matching a given mask (@see dateTimeParsePartsTry) |
function dateTimeFormat(const mask: string; y, m,d, h, n, s: Integer; const secondFraction: double = 0; const timezone: TDateTime = Nan): string; |
|
Converts a dateTime to a string corresponding to the given mask (same mask as dateTimeParsePartsTry) |
function dateTimeFormat(const mask: string; const dateTime: TDateTime): string; |
|
Converts a dateTime to a string corresponding to the given mask (same mask as dateTimeParsePartsTry) |
function dateTimeEncode(const y,m,d,h,n,s:integer; const secondFraction: double = 0): TDateTime; |
|
Encodes a date time |
procedure timeParseParts(const input,mask:string; outHour, outMinutes, outSeconds: PInteger; outSecondFraction: PDouble = nil; outtimezone: PDateTime = nil); |
|
Reads a time string given a certain mask (@see dateTimeParsePartsTry) |
function timeParse(const input,mask:string): TTime; |
|
Reads a time string given a certain mask (@see dateTimeParsePartsTry). |
function timeFormat(const mask: string; const h, n, s: integer; const secondFraction: double = 0; const timezone: TDateTime = Nan): string; |
|
Converts a dateTime to a string corresponding to the given mask (same mask as dateTimeParsePartsTry) |
procedure dateParseParts(const input,mask:string; outYear, outMonth, outDay: PInteger; outtimezone: PDateTime = nil); |
|
Reads a date string given a certain mask (@see dateTimeParsePartsTry) |
function dateParse(const input,mask:string): longint; |
|
Reads a date string given a certain mask (@see dateTimeParsePartsTry) |
function dateFormat(const mask: string; const y, m, d: integer; const timezone: TDateTime = nan): string; |
|
Converts a dateTime to a string corresponding to the given mask (same mask as dateTimeParsePartsTry) |
function dateEncodeTry(year, month, day: integer; out dt: TDateTime): boolean; |
|
Encodes a date as datetime (supports negative years) |
function dateEncode(year, month, day: integer): TDateTime; |
|
Encodes a date as datetime (supports negative years) |
procedure dateDecode(date: TDateTime; year, month, day: PInteger); |
|
Encodes a date as datetime (supports negative years) |
procedure stableSort(a,b: pointer; size: longint; compareFunction: TPointerCompareFunction = nil; compareFunctionData: TObject=nil); |
|
General stable sort function |
procedure stableSort(intArray: TLongintArray; compareFunction: TPointerCompareFunction; compareFunctionData: TObject=nil); |
|
general stable sort function (using merge + insert sort in the moment) |
TStringArray=array of string; |
TLongintArray =array of longint; |
TLongwordArray =array of longword; |
TInt64Array =array of int64; |
TFloatArray =array of float; |
T__ArrayType__ = TStringArray; |
T__ElementType__ = string; |
T__INT__NUMBER__ = integer; |
TProcedureOfObject = procedure () of object; |
TEncoding = (...); |
Values
|
TCharSet = set of char; |
__ELEMENT__DEFAULT__: T__ElementType__ = ''; |
powersOf10: array[0..10] of longint = (1,10,100,1000,10000,100000,1000000,1000000,10000000,100000000,1000000000); |
WHITE_SPACE=[#9,#10,#13,' ']; |