Unit mseformatstr

Description

 

Overview

Classes, Interfaces, Objects and Records

Name Description
Record TFormatSettingsmse  
Class tformatmacrolist  

Functions and Procedures

function lstring(const s: string; const minwidth: integer): string;
function rstring(const s: string; const minwidth: integer): string;
function formatdatetimemse(const formatstr: msestring; const datetime: tdatetime; const formatsettings: tformatsettingsmse): msestring;
function formatdatetimemse(const formatstr: msestring; const datetime: tdatetime): msestring;
function formatdatetimemse(const datetime: tdatetime; formatstr: msestring; const formatsettings: tformatsettingsmse): msestring;
function formatdatetimemse(const datetime: tdatetime; const formatstr: msestring): msestring;
function formatfloatmse(value: double; format: msestring; const formatsettings: tformatsettingsmse; const dot: boolean = false): msestring; overload;
function formatfloatmse(const value: double; const format: msestring; const dot: boolean = false): msestring; overload;
function realtostrmse(const value: double; const dot: boolean = false): msestring;
function realtytostrmse(const value: double; const dot: boolean = false): msestring;
function inttostr(const value: integer): string;
function inttostr(const value: longword): string;
function inttostr(const value: int64): string;
function inttostr(const value: qword): string;
function inttostrmse(const value: integer): msestring; overload;
function inttostrmse(const value: longword): msestring; overload;
function inttostrmse(const value: int64): msestring; overload;
function inttostrmse(const value: qword): msestring; overload;
function trystrtodouble(const s: lstringty; out value: double; const decimalseparator: char): boolean; overload;
function trystrtodouble(const s: lmsestringty; out value: double; const decimalseparator: msechar): boolean; overload;
function trystrtodouble(const s: string; out value: double; const decimalseparator: char): boolean; overload;
function trystrtodouble(const s: msestring; out value: double; const decimalseparator: msechar): boolean; overload;
function strtodouble(const s: string; const decimalseparator: char): double;
function strtodouble(const s: msestring; const decimalseparator: msechar): double;
function trystrtodouble(const s: string; out value: double): boolean; overload;
function trystrtodouble(const s: msestring; out value: double): boolean; overload;
function strtodouble(const s: string): double;
function strtodouble(const s: msestring): double;
function realtostr(const value: double): string;
function strtoreal(const s: string): double;
function trystrtoreal(const s: string; out value: real): boolean;
function strtoreal(const s: msestring): double;
function trystrtoreal(const s: msestring; out value: real): boolean;
function currencytostr(const avalue: currency): string;
function currencytostrmse(const avalue: currency): msestring;
function trystrtorealty(const ein: msestring; out value: realty; forcevalue: boolean = false): boolean;
function strtorealty(const ein: string; forcevalue: boolean = false): realty;
function strtorealty(const ein: msestring; forcevalue: boolean = false): realty;
function strtorealtydot(const ein: string): realty;
function strtorealtydot(const ein: msestring): realty;
function trystrtorealtydot(const ein: string; out value: realty): boolean;
function trystrtorealtydot(const ein: msestring; out value: realty): boolean;
function realtytostr(const val: realty; const format: msestring = ''; const scale: real = 1): msestring; deprecated 'use realtytostring() instead';
function realtytostring(const val: realty; const format: msestring = ''; const scale: real = 1): msestring;
function realtytostrrange(const val: realty; const format: msestring = ''; const range: real = 1; const offset: real = 0): msestring;
function realtytostrdot(const val: realty): string;
function realtytostrdotmse(const val: realty): msestring;
function wordtostr(const avalue: longword): string;
function bytetohex(const inp: byte): string;
function wordtohex(const inp: word; lsbfirst: boolean = false): string;
function valtohex(const avalue: byte): string; overload;
function valtohex(const avalue: word): string; overload;
function valtohex(const avalue: longword): string; overload;
function valtohex(const avalue: qword): string; overload;
function dectostr(const inp: integer; digits: integer): string; overload;
function dectostr(const inp: int64; digits: integer): string; overload;
function bintostr(inp: longword; digits: integer): string; overload;
function bintostr(inp: qword; digits: integer): string; overload;
function octtostr(inp: longword; digits: integer): string; overload;
function octtostr(inp: qword; digits: integer): string; overload;
function hextostr(inp: longword; digits: integer = 2*sizeof(longword)): string; overload;
function hextostr(inp: qword; digits: integer = 2*sizeof(qword)): string; overload;
function hextostr(const inp: pointer; digits: integer = 2*sizeof(pointer)): string; overload;
function hextostrmse(inp: longword; digits: integer = 2*sizeof(longword)): msestring; overload;
function hextostrmse(inp: qword; digits: integer = 2*sizeof(qword)): msestring; overload;
function hextostrmse(const inp: pointer; digits: integer = 2*sizeof(pointer)): msestring; overload;
function hextocstr(const inp: longword; stellen: integer): string; overload;
function hextocstr(const inp: qword; stellen: integer): string; overload;
function ptruinttocstr(inp: ptruint): string; overload;
function qwordtocstr(inp: qword): string; overload;
function intvaluetostr(const value: integer; const base: numbasety = nb_dec; const bitcount: integer = 32): string; overload;
function intvaluetostr(const value: int64; const base: numbasety = nb_dec; const bitcount: integer = 64): string; overload;
function trystrtoptruint(const inp: string; out value: ptruint): boolean;
function strtoptruint(const inp: string): ptruint;
function trystrtobin(const inp: string; out value: longword): boolean;
function strtobin(const inp: string): longword;
function trystrtooct(const inp: string; out value: longword): boolean;
function strtooct(const inp: string): longword;
function trystrtodec(const inp: string; out value: longword): boolean;
function strtodec(const inp: string): longword;
function trystrtohex(const inp: pchar; const len: int32; out value: longword): boolean;
function trystrtohex(const inp: lstringty; out value: longword): boolean;
function trystrtohex(const inp: string; out value: longword): boolean;
function trystrtohex(const inp: msestring; out value: longword): boolean;
function strtohex(const inp: string): longword;
function strtohex(const inp: msestring): longword;
function trystrtobin64(const inp: string; out value: qword): boolean;
function strtobin64(const inp: string): qword;
function trystrtooct64(const inp: string; out value: qword): boolean;
function strtooct64(const inp: string): qword;
function trystrtodec64(const inp: string; out value: qword): boolean;
function strtodec64(const inp: string): qword;
function trystrtohex64(const inp: string; out value: qword): boolean;
function strtohex64(const inp: string): qword;
function trystrtoint(const text: pchar; const len: int32; out value: integer): boolean;
function trystrtoint(const text: lstringty; out value: integer): boolean;
function trystrtoint(const text: string; out value: integer): boolean;
function trystrtoint(const text: msestring; out value: integer): boolean;
function strtoint(const text: string): integer;
function strtoint(const text: msestring): integer;
function trystrtoint(const text: string; out value: longword): boolean;
function trystrtoint(const text: msestring; out value: longword): boolean;
function strtoint64(const text: string): int64;
function strtoint64(const text: msestring): int64;
function trystrtoint64(const text: lstringty; out value: int64): boolean;
function trystrtoint64(const text: string; out value: int64): boolean;
function trystrtoint64(const text: msestring; out value: int64): boolean;
function trystrtoqword(const text: string; out value: qword): boolean;
function trystrtoqword(const text: msestring; out value: qword): boolean;
function trystrtointvalue(const inp: string; out value: longword): boolean; overload;
function strtointvalue(const inp: string): longword; overload;
function trystrtointvalue(const text: msestring; base: numbasety; out value: longword): boolean; overload;
function strtointvalue(const text: msestring; base: numbasety): longword; overload;
function trystrtointvalue64(const inp: string; out value: qword): boolean; overload;
function strtointvalue64(const inp: string): qword; overload;
function trystrtointvalue64(const text: msestring; base: numbasety; out value: qword): boolean; overload;
function strtointvalue64(const text: msestring; base: numbasety): qword; overload;
function bytestrtostr(const inp: ansistring; base: numbasety = nb_hex; spacechar: char = #0): string;
function bytestrtobin(const inp: ansistring; abstand: boolean): string;
function bitmaske(const data: ansistring): integer;
function bitcount(const data: ansistring): integer;
function bcdtostr(inp: byte): string;
function bytetobcd(inp: byte): word;
function bcdtobyte(inp: byte): byte;
function strtobytestr(inp: string): ansistring;
function strtobinstr(inp: string): ansistring;
function strtobytes(const inp: string; out dest: bytearty): boolean;
function inttostrlen(inp: integer; len: integer; rechtsbuendig: boolean = true; fillchar: char = ' '): ansistring;
function inttostrlenmse(inp: integer; len: integer; rechtsbuendig: boolean = true; fillchar: msechar = ' '): msestring;
function bcdtoint(inp: byte): integer;
function inttobcd(inp: integer): byte;
function stringtotime(const avalue: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
function stringtotime(const avalue: msestring; const aformat: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
function trystringtotime(const text: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
function trystringtotime(const text: msestring; const aformat: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
function timetostring(const avalue: tdatetime; const format: msestring = 't'): msestring;
function datetostring(const avalue: tdatetime; const format: msestring = 'c'): msestring;
function stringtodate(const avalue: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
function stringtodate(const avalue: msestring; const aformat: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
function trystringtodate(const text: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
function trystringtodate(const text: msestring; const aformat: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
function datetimetostring(const avalue: tdatetime; const format: msestring = 'c'): msestring;
function stringtodatetime(const avalue: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
function stringtodatetime(const avalue: msestring; const aformat: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
function trystringtodatetime(const text: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
function trystringtodatetime(const text: msestring; aformat: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
procedure checkdateconvert(const convert: dateconvertty; var value: tdatetime);
procedure checkdatereconvert(const convert: dateconvertty; var value: tdatetime);
function timemse(const value: tdatetime): tdatetime;
function cstringtostring(inp: pchar): string; overload;
function cstringtostring(const inp: string): string; overload;
function cstringtostringvar(var inp: pchar): string;
function stringtocstring(const inp: msestring): string; overload;
function stringtocstring(const inp: pmsechar; const count: integer): string; overload;
function stringtopascalstring(const value: msestring; const maxlinelength: int32 = 0): string;
function pascalstringtostring(const value: string): msestring;
function trypascalstringtostring(const value: string; out res: msestring ): boolean;
function getpascalstring(var value: pchar): msestring;
function encodebase64(const abinary: string; const maxlinelength: integer = defaultbase64linelength): string; overload;
function encodebase64(const abinary: pbyte; acount: integer; const maxlinelength: integer = defaultbase64linelength): string; overload;
function decodebase64(const atext: string): string;
function encodexmlstring(const value: msestring): msestring;
function TryStrToQWord(const S: string; out Value: QWord): Boolean;
procedure msestrtotvarrec(const value: ansistring; out varrec: tvarrec);
procedure msestrtotvarrec(const value: msestring; out varrec: tvarrec);
function tvarrectoansistring(const value: tvarrec): ansistring;
function tvarrectomsestring(const value: tvarrec): msestring;
function formatmse(const fmt: msestring; const args: array of const): msestring;
function formatmse(const fmt: msestring; const args: array of const; const formatsettings: tformatsettingsmse): msestring;
function formatmacros: tformatmacrolist;
procedure clearformatmacros;

Types

dateconvertty = (...);
TMonthNameArraymse = array[1..12] of msestring;
TWeekNameArraymse = array[1..7] of msestring;
numbasety = (...);

Constants

noformatsettings = 15;
fc_keinplatzchar = '*';
nullen = '000000000000000000000000000000';
msenullen = msestring('000000000000000000000000000000');
msespace = msestring(' ');
charhex: array[0..15] of char = ('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
charhexlower: array[0..15] of char = ('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f');
hexchars: array[char] of byte = ( $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$80,$80,$80,$80,$80,$80, $80,$0A,$0B,$0C,$0D,$0E,$0F,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$0a,$0b,$0c,$0d,$0e,$0f,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80);
base64mask = $3f;
base64encoding: array[0..63] of char = ( 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', 'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/');
base64decoding: array[0..255] of byte = ( $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$3e,$ff,$ff,$ff,$3f, $34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$3d,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$0c,$0d,$0e, $0f,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$ff,$ff,$ff,$ff,$ff, $ff,$1a,$1b,$1c,$1d,$1e,$1f,$20,$21,$22,$23,$24,$25,$26,$27,$28, $29,$2a,$2b,$2c,$2d,$2e,$2f,$30,$31,$32,$33,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff);

Variables

DefaultFormatSettingsmse: TFormatSettingsmse = ( CurrencyFormat: 1; NegCurrFormat: 5; ThousandSeparator: ','; DecimalSeparator: '.'; CurrencyDecimals: 2; DateSeparator: '-'; TimeSeparator: ':'; ListSeparator: ','; CurrencyString: '$'; ShortDateFormat: 'd/m/y'; LongDateFormat: 'dd" "mmmm" "yyyy'; TimeAMString: 'AM'; TimePMString: 'PM'; ShortTimeFormat: 'hh:nn'; LongTimeFormat: 'hh:nn:ss'; ShortMonthNames: ('Jan','Feb','Mar','Apr','May','Jun', 'Jul','Aug','Sep','Oct','Nov','Dec'); LongMonthNames: ('January','February','March','April','May','June', 'July','August','September','October','November', 'December'); ShortDayNames: ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); LongDayNames: ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday', 'Saturday'); TwoDigitYearCenturyWindow: 50; );
defaultformatsettingsdot: tformatsettings;

Description

Functions and Procedures

function lstring(const s: string; const minwidth: integer): string;
 
function rstring(const s: string; const minwidth: integer): string;
 
function formatdatetimemse(const formatstr: msestring; const datetime: tdatetime; const formatsettings: tformatsettingsmse): msestring;
 
function formatdatetimemse(const formatstr: msestring; const datetime: tdatetime): msestring;
 
function formatdatetimemse(const datetime: tdatetime; formatstr: msestring; const formatsettings: tformatsettingsmse): msestring;
 
function formatdatetimemse(const datetime: tdatetime; const formatstr: msestring): msestring;
 
function formatfloatmse(value: double; format: msestring; const formatsettings: tformatsettingsmse; const dot: boolean = false): msestring; overload;
 
function formatfloatmse(const value: double; const format: msestring; const dot: boolean = false): msestring; overload;
 
function realtostrmse(const value: double; const dot: boolean = false): msestring;
 
function realtytostrmse(const value: double; const dot: boolean = false): msestring;
 
function inttostr(const value: integer): string;
 
function inttostr(const value: longword): string;
 
function inttostr(const value: int64): string;
 
function inttostr(const value: qword): string;
 
function inttostrmse(const value: integer): msestring; overload;
 
function inttostrmse(const value: longword): msestring; overload;
 
function inttostrmse(const value: int64): msestring; overload;
 
function inttostrmse(const value: qword): msestring; overload;
 
function trystrtodouble(const s: lstringty; out value: double; const decimalseparator: char): boolean; overload;
 
function trystrtodouble(const s: lmsestringty; out value: double; const decimalseparator: msechar): boolean; overload;
 
function trystrtodouble(const s: string; out value: double; const decimalseparator: char): boolean; overload;
 
function trystrtodouble(const s: msestring; out value: double; const decimalseparator: msechar): boolean; overload;
 
function strtodouble(const s: string; const decimalseparator: char): double;
 
function strtodouble(const s: msestring; const decimalseparator: msechar): double;
 
function trystrtodouble(const s: string; out value: double): boolean; overload;
 
function trystrtodouble(const s: msestring; out value: double): boolean; overload;
 
function strtodouble(const s: string): double;
 
function strtodouble(const s: msestring): double;
 
function realtostr(const value: double): string;
 
function strtoreal(const s: string): double;
 
function trystrtoreal(const s: string; out value: real): boolean;
 
function strtoreal(const s: msestring): double;
 
function trystrtoreal(const s: msestring; out value: real): boolean;
 
function currencytostr(const avalue: currency): string;
 
function currencytostrmse(const avalue: currency): msestring;
 
function trystrtorealty(const ein: msestring; out value: realty; forcevalue: boolean = false): boolean;
 
function strtorealty(const ein: string; forcevalue: boolean = false): realty;
 
function strtorealty(const ein: msestring; forcevalue: boolean = false): realty;
 
function strtorealtydot(const ein: string): realty;
 
function strtorealtydot(const ein: msestring): realty;
 
function trystrtorealtydot(const ein: string; out value: realty): boolean;
 
function trystrtorealtydot(const ein: msestring; out value: realty): boolean;
 
function realtytostr(const val: realty; const format: msestring = ''; const scale: real = 1): msestring; deprecated 'use realtytostring() instead';

Warning: this symbol is deprecated: use realtytostring() instead

 
function realtytostring(const val: realty; const format: msestring = ''; const scale: real = 1): msestring;
 
function realtytostrrange(const val: realty; const format: msestring = ''; const range: real = 1; const offset: real = 0): msestring;
 
function realtytostrdot(const val: realty): string;
 
function realtytostrdotmse(const val: realty): msestring;
 
function wordtostr(const avalue: longword): string;
 
function bytetohex(const inp: byte): string;
 
function wordtohex(const inp: word; lsbfirst: boolean = false): string;
 
function valtohex(const avalue: byte): string; overload;
 
function valtohex(const avalue: word): string; overload;
 
function valtohex(const avalue: longword): string; overload;
 
function valtohex(const avalue: qword): string; overload;
 
function dectostr(const inp: integer; digits: integer): string; overload;
 
function dectostr(const inp: int64; digits: integer): string; overload;
 
function bintostr(inp: longword; digits: integer): string; overload;
 
function bintostr(inp: qword; digits: integer): string; overload;
 
function octtostr(inp: longword; digits: integer): string; overload;
 
function octtostr(inp: qword; digits: integer): string; overload;
 
function hextostr(inp: longword; digits: integer = 2*sizeof(longword)): string; overload;
 
function hextostr(inp: qword; digits: integer = 2*sizeof(qword)): string; overload;
 
function hextostr(const inp: pointer; digits: integer = 2*sizeof(pointer)): string; overload;
 
function hextostrmse(inp: longword; digits: integer = 2*sizeof(longword)): msestring; overload;
 
function hextostrmse(inp: qword; digits: integer = 2*sizeof(qword)): msestring; overload;
 
function hextostrmse(const inp: pointer; digits: integer = 2*sizeof(pointer)): msestring; overload;
 
function hextocstr(const inp: longword; stellen: integer): string; overload;
 
function hextocstr(const inp: qword; stellen: integer): string; overload;
 
function ptruinttocstr(inp: ptruint): string; overload;
 
function qwordtocstr(inp: qword): string; overload;
 
function intvaluetostr(const value: integer; const base: numbasety = nb_dec; const bitcount: integer = 32): string; overload;
 
function intvaluetostr(const value: int64; const base: numbasety = nb_dec; const bitcount: integer = 64): string; overload;
 
function trystrtoptruint(const inp: string; out value: ptruint): boolean;
 
function strtoptruint(const inp: string): ptruint;
 
function trystrtobin(const inp: string; out value: longword): boolean;
 
function strtobin(const inp: string): longword;
 
function trystrtooct(const inp: string; out value: longword): boolean;
 
function strtooct(const inp: string): longword;
 
function trystrtodec(const inp: string; out value: longword): boolean;
 
function strtodec(const inp: string): longword;
 
function trystrtohex(const inp: pchar; const len: int32; out value: longword): boolean;
 
function trystrtohex(const inp: lstringty; out value: longword): boolean;
 
function trystrtohex(const inp: string; out value: longword): boolean;
 
function trystrtohex(const inp: msestring; out value: longword): boolean;
 
function strtohex(const inp: string): longword;
 
function strtohex(const inp: msestring): longword;
 
function trystrtobin64(const inp: string; out value: qword): boolean;
 
function strtobin64(const inp: string): qword;
 
function trystrtooct64(const inp: string; out value: qword): boolean;
 
function strtooct64(const inp: string): qword;
 
function trystrtodec64(const inp: string; out value: qword): boolean;
 
function strtodec64(const inp: string): qword;
 
function trystrtohex64(const inp: string; out value: qword): boolean;
 
function strtohex64(const inp: string): qword;
 
function trystrtoint(const text: pchar; const len: int32; out value: integer): boolean;
 
function trystrtoint(const text: lstringty; out value: integer): boolean;
 
function trystrtoint(const text: string; out value: integer): boolean;
 
function trystrtoint(const text: msestring; out value: integer): boolean;
 
function strtoint(const text: string): integer;
 
function strtoint(const text: msestring): integer;
 
function trystrtoint(const text: string; out value: longword): boolean;
 
function trystrtoint(const text: msestring; out value: longword): boolean;
 
function strtoint64(const text: string): int64;
 
function strtoint64(const text: msestring): int64;
 
function trystrtoint64(const text: lstringty; out value: int64): boolean;
 
function trystrtoint64(const text: string; out value: int64): boolean;
 
function trystrtoint64(const text: msestring; out value: int64): boolean;
 
function trystrtoqword(const text: string; out value: qword): boolean;
 
function trystrtoqword(const text: msestring; out value: qword): boolean;
 
function trystrtointvalue(const inp: string; out value: longword): boolean; overload;
 
function strtointvalue(const inp: string): longword; overload;
 
function trystrtointvalue(const text: msestring; base: numbasety; out value: longword): boolean; overload;
 
function strtointvalue(const text: msestring; base: numbasety): longword; overload;
 
function trystrtointvalue64(const inp: string; out value: qword): boolean; overload;
 
function strtointvalue64(const inp: string): qword; overload;
 
function trystrtointvalue64(const text: msestring; base: numbasety; out value: qword): boolean; overload;
 
function strtointvalue64(const text: msestring; base: numbasety): qword; overload;
 
function bytestrtostr(const inp: ansistring; base: numbasety = nb_hex; spacechar: char = #0): string;
 
function bytestrtobin(const inp: ansistring; abstand: boolean): string;
 
function bitmaske(const data: ansistring): integer;
 
function bitcount(const data: ansistring): integer;
 
function bcdtostr(inp: byte): string;
 
function bytetobcd(inp: byte): word;
 
function bcdtobyte(inp: byte): byte;
 
function strtobytestr(inp: string): ansistring;
 
function strtobinstr(inp: string): ansistring;
 
function strtobytes(const inp: string; out dest: bytearty): boolean;
 
function inttostrlen(inp: integer; len: integer; rechtsbuendig: boolean = true; fillchar: char = ' '): ansistring;
 
function inttostrlenmse(inp: integer; len: integer; rechtsbuendig: boolean = true; fillchar: msechar = ' '): msestring;
 
function bcdtoint(inp: byte): integer;
 
function inttobcd(inp: integer): byte;
 
function stringtotime(const avalue: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
 
function stringtotime(const avalue: msestring; const aformat: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
 
function trystringtotime(const text: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
 
function trystringtotime(const text: msestring; const aformat: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
 
function timetostring(const avalue: tdatetime; const format: msestring = 't'): msestring;
 
function datetostring(const avalue: tdatetime; const format: msestring = 'c'): msestring;
 
function stringtodate(const avalue: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
 
function stringtodate(const avalue: msestring; const aformat: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
 
function trystringtodate(const text: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
 
function trystringtodate(const text: msestring; const aformat: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
 
function datetimetostring(const avalue: tdatetime; const format: msestring = 'c'): msestring;
 
function stringtodatetime(const avalue: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
 
function stringtodatetime(const avalue: msestring; const aformat: msestring; const convert: dateconvertty = dc_none): tdatetime; overload;
 
function trystringtodatetime(const text: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
 
function trystringtodatetime(const text: msestring; aformat: msestring; out value: tdatetime; const convert: dateconvertty = dc_none): boolean; overload;
 
procedure checkdateconvert(const convert: dateconvertty; var value: tdatetime);
 
procedure checkdatereconvert(const convert: dateconvertty; var value: tdatetime);
 
function timemse(const value: tdatetime): tdatetime;
 
function cstringtostring(inp: pchar): string; overload;
 
function cstringtostring(const inp: string): string; overload;
 
function cstringtostringvar(var inp: pchar): string;
 
function stringtocstring(const inp: msestring): string; overload;
 
function stringtocstring(const inp: pmsechar; const count: integer): string; overload;
 
function stringtopascalstring(const value: msestring; const maxlinelength: int32 = 0): string;
 
function pascalstringtostring(const value: string): msestring;
 
function trypascalstringtostring(const value: string; out res: msestring ): boolean;
 
function getpascalstring(var value: pchar): msestring;
 
function encodebase64(const abinary: string; const maxlinelength: integer = defaultbase64linelength): string; overload;
 
function encodebase64(const abinary: pbyte; acount: integer; const maxlinelength: integer = defaultbase64linelength): string; overload;
 
function decodebase64(const atext: string): string;
 
function encodexmlstring(const value: msestring): msestring;
 
function TryStrToQWord(const S: string; out Value: QWord): Boolean;
 
procedure msestrtotvarrec(const value: ansistring; out varrec: tvarrec);
 
procedure msestrtotvarrec(const value: msestring; out varrec: tvarrec);
 
function tvarrectoansistring(const value: tvarrec): ansistring;
 
function tvarrectomsestring(const value: tvarrec): msestring;
 
function formatmse(const fmt: msestring; const args: array of const): msestring;
 
function formatmse(const fmt: msestring; const args: array of const; const formatsettings: tformatsettingsmse): msestring;
 
function formatmacros: tformatmacrolist;
 
procedure clearformatmacros;
 

Types

dateconvertty = (...);
 
Values
  • dc_none
  • dc_tolocal
  • dc_toutc
TMonthNameArraymse = array[1..12] of msestring;
 
TWeekNameArraymse = array[1..7] of msestring;
 
numbasety = (...);
 
Values
  • nb_bin
  • nb_oct
  • nb_dec
  • nb_hex

Constants

noformatsettings = 15;
 
fc_keinplatzchar = '*';
 
nullen = '000000000000000000000000000000';
 
msenullen = msestring('000000000000000000000000000000');
 
msespace = msestring(' ');
 
charhex: array[0..15] of char = ('0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F');
 
charhexlower: array[0..15] of char = ('0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f');
 
hexchars: array[char] of byte = ( $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$80,$80,$80,$80,$80,$80, $80,$0A,$0B,$0C,$0D,$0E,$0F,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$0a,$0b,$0c,$0d,$0e,$0f,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80, $80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80,$80);
 
base64mask = $3f;
 
base64encoding: array[0..63] of char = ( 'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P', 'Q','R','S','T','U','V','W','X','Y','Z','a','b','c','d','e','f', 'g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v', 'w','x','y','z','0','1','2','3','4','5','6','7','8','9','+','/');
 
base64decoding: array[0..255] of byte = ( $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$3e,$ff,$ff,$ff,$3f, $34,$35,$36,$37,$38,$39,$3a,$3b,$3c,$3d,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$00,$01,$02,$03,$04,$05,$06,$07,$08,$09,$0a,$0b,$0c,$0d,$0e, $0f,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$ff,$ff,$ff,$ff,$ff, $ff,$1a,$1b,$1c,$1d,$1e,$1f,$20,$21,$22,$23,$24,$25,$26,$27,$28, $29,$2a,$2b,$2c,$2d,$2e,$2f,$30,$31,$32,$33,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff, $ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff,$ff);
 

Variables

DefaultFormatSettingsmse: TFormatSettingsmse = ( CurrencyFormat: 1; NegCurrFormat: 5; ThousandSeparator: ','; DecimalSeparator: '.'; CurrencyDecimals: 2; DateSeparator: '-'; TimeSeparator: ':'; ListSeparator: ','; CurrencyString: '$'; ShortDateFormat: 'd/m/y'; LongDateFormat: 'dd" "mmmm" "yyyy'; TimeAMString: 'AM'; TimePMString: 'PM'; ShortTimeFormat: 'hh:nn'; LongTimeFormat: 'hh:nn:ss'; ShortMonthNames: ('Jan','Feb','Mar','Apr','May','Jun', 'Jul','Aug','Sep','Oct','Nov','Dec'); LongMonthNames: ('January','February','March','April','May','June', 'July','August','September','October','November', 'December'); ShortDayNames: ('Sun','Mon','Tue','Wed','Thu','Fri','Sat'); LongDayNames: ('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday', 'Saturday'); TwoDigitYearCenturyWindow: 50; );
 
defaultformatsettingsdot: tformatsettings;
 

Generated by PasDoc 0.16.0.