Unit uRESTDWTools
Classes, Interfaces, Objetos e Registros
Tipos
Variáveis
Descrição
Uses
- LConvEncoding
- lazutf8
- Classes
- SysUtils
- DB
- uRESTDWBasicTypes
- uRESTDWEncodeClass
- uRESTDWMimeTypes
- uRESTDWConsts
Visão Geral
Funções e Procedimentos
Function EncodeStrings(Value : String ;DatabaseCharSet : TDatabaseCharSet) : String; |
Function DecodeStrings(Value : String ;DatabaseCharSet : TDatabaseCharSet) : String; |
Function EncodeStream(Value : TStream) : String; |
Function DecodeStream(Value : String) : TMemoryStream; |
Function BytesToString(Const bin : TRESTDWBytes) : String; Overload; |
Function BytesToString(Const AValue : TRESTDWBytes; Const AStartIndex : Integer; Const ALength : Integer = -1) : String; Overload; |
Function restdwLength(Const ABuffer : String; Const ALength : Integer = -1; Const AIndex : Integer = 1) : Integer; Overload; |
Function restdwLength(Const ABuffer : TRESTDWBytes; Const ALength : Integer = -1; Const AIndex : Integer = 0) : Integer; Overload; |
Function restdwLength(Const ABuffer : TStream; Const ALength : TRESTDWStreamSize = -1) : TRESTDWStreamSize; Overload; |
Function restdwMax(Const AValueOne, AValueTwo : Int64) : Int64; |
Function restdwMin(Const AValueOne, AValueTwo : Int64) : Int64; |
Function StringToBytes(AStr : String) : TRESTDWBytes; |
Function StreamToBytes(Stream : TStream) : TRESTDWBytes; |
Function StringToFieldType(Const S : String) : Integer; |
Function Escape_chars(s : String) : String; |
Function Unescape_chars(s : String) : String; |
Function HexToBookmark(Value : String) : TRESTDWBytes; |
Function BookmarkToHex(Value : TRESTDWBytes) : String; |
Procedure CopyStringList(Const Source, Dest : TStringList); |
Function RemoveBackslashCommands(Value : String) : String; |
Function RESTDWFileExists(sFile, BaseFilePath : String) : Boolean; |
Function TravertalPathFind(Value : String) : Boolean; |
Function GetEventName(Value : String) : String; |
Function ExtractHeaderSubItem(Const AHeaderLine, ASubItem : String; QuotingType : TRESTDWHeaderQuotingType) : String; |
Function ReadLnFromStream(AStream : TStream; Var VLine : String; AMaxLineLength : Integer = -1) : Boolean; Overload; |
Function ReadLnFromStream(AStream : TStream; AMaxLineLength : Integer = -1; AExceptionIfEOF : Boolean = False) : String; Overload; |
Function ValueFromIndex(AStrings : TStrings; Const AIndex : Integer) : String; |
Function restdwValueFromIndex(AStrings : TStrings; Const AIndex : Integer) : String; |
Function iif(ATest : Boolean; Const ATrue : Integer; Const AFalse : Integer) : Integer; |
Function CharRange(Const AMin, AMax : Char) : String; |
Function CharIsInSet(Const AString : String; Const ACharPos : Integer; Const ASet : String) : Boolean; |
Function ExtractHeaderItem(Const AHeaderLine : String) : String; |
Function TextIsSame(Const A1, A2 : String) : Boolean; |
Function WrapText(Const ALine, ABreakStr, ABreakChars : String; MaxCol : Integer) : String; |
Function Fetch(Var AInput : String; Const ADelim : String = ''; Const ADelete : Boolean = True; Const ACaseSensitive : Boolean = True) : String; |
Function InternalAnsiPos(Const Substr, S : String) : Integer; |
Function PosInStrArray(Const SearchStr : String; Const Contents : Array Of String; Const CaseSensitive : Boolean = True) : Integer; |
Function ReplaceHeaderSubItem(Const AHeaderLine, ASubItem, AValue : String; AQuoteType : TRESTDWHeaderQuotingType) : String; Overload; |
Function ReplaceHeaderSubItem(Const AHeaderLine, ASubItem, AValue : String; Var VOld : String; AQuoteType : TRESTDWHeaderQuotingType) : String; Overload; |
Procedure SplitHeaderSubItems(AHeaderLine : String; AItems : TStrings; AQuoteType : TRESTDWHeaderQuotingType); |
Function TextStartsWith(Const S, SubS : String) : Boolean; |
Function TextEndsWith(Const S, SubS : String) : Boolean; |
Function Max(Const AValueOne, AValueTwo : Int64) : Int64; |
Function Min(Const AValueOne, AValueTwo : Int64) : Int64; |
Function RawToBytes(Const AValue : String; Const ASize : Integer) : TRESTDWBytes; |
Procedure CopyBytes(Const ASource : TRESTDWBytes; Const ASourceIndex : Integer; Var VDest : TRESTDWBytes; Const ADestIndex : Integer; Const ALength : Integer); |
Function ByteIsInSet(Const ABytes : TRESTDWBytes; Const AIndex : Integer; Const ASet : TRESTDWBytes) : Boolean; |
Function ToBytes(Const AValue : String) : TRESTDWBytes; Overload; |
Function ToBytes(Const AValue : Char) : TRESTDWBytes; Overload; |
Function ToBytes(Const AValue : String; Const ALength : Integer; Const AIndex : Integer = 1) : TRESTDWBytes; Overload; |
Function ToBytes(Const AValue : TRESTDWBytes; Const ASize : Integer; Const AIndex : Integer = 0) : TRESTDWBytes; Overload; |
Function GetBytes(Const AChars : PDWWideChar; ACharCount : Integer) : TRESTDWBytes; Overload; |
Function GetBytes(Const AChars : PDWWideChar; ACharCount : Integer; ABytes : PByte; AByteCount : Integer) : Integer; Overload; |
Function GetBytes(Const AChars : TRESTDWWideChars; ACharIndex, ACharCount : Integer; Var VBytes : TRESTDWBytes; AByteIndex : Integer) : Integer; Overload; |
Function GetBytes(Const AChars : PDWWideChar; ACharCount : Integer; Var VBytes : TRESTDWBytes; AByteIndex : Integer) : Integer; Overload; |
Function GetBytes(Const AChars : String) : TRESTDWBytes; Overload; |
Function GetChars(Const ABytes : TRESTDWBytes; AByteIndex, AByteCount : Integer) : TRESTDWWideChars; Overload; |
Function GetChars(Const ABytes : TRESTDWBytes) : TRESTDWWideChars; Overload; |
Function GetChars(Const ABytes : PByte; AByteCount : Integer) : TRESTDWWideChars; Overload; |
Function GetChars(Const ABytes : TRESTDWBytes; AByteIndex, AByteCount : Integer; Var VChars : TRESTDWWideChars; ACharIndex : Integer) : Integer; Overload; |
Function GetChars(Const ABytes : PByte; AByteCount : Integer; Var VChars : TRESTDWWideChars; ACharIndex : Integer) : Integer; Overload; |
Function GetChars(Const ABytes : PByte; AByteCount : Integer; AChars : PDWWideChar; ACharCount : Integer) : Integer; Overload; |
Function GetCharCount(Const ABytes : TRESTDWBytes; AByteIndex, AByteCount : Integer) : Integer; Overload; |
Function GetCharCount(Const ABytes : PByte; AByteCount : Integer) : Integer; Overload; |
Function ValidateBytes(Const ABytes : TRESTDWBytes; AByteIndex, AByteCount, ANeeded : Integer) : PByte; Overload; |
Function ValidateBytes(Const ABytes : TRESTDWBytes; AByteIndex, AByteCount : Integer) : PByte; Overload; |
Function ReadBytesFromStream(Const AStream : TStream; Var ABytes : TRESTDWBytes; Const Count : TRESTDWStreamSize; Const AIndex : Integer = 0) : TRESTDWStreamSize; |
Procedure WriteBytesToStream(Const AStream : TStream; Const ABytes : TRESTDWBytes; Const ASize : Integer = -1; Const AIndex : Integer = 0); |
Procedure StringToStream(AStream : TStream; Const AStr : String); |
procedure WriteStringToStream(AStream : TStream; Const AStr : String; Const ALength : Integer = -1; Const AIndex : Integer = 1); Overload; |
Function ReadStringFromStream(AStream : TStream; ASize : Integer = -1) : String; Overload; |
Procedure AppendBytes(Var VBytes : TRESTDWBytes; Const AToAdd : TRESTDWBytes; Const AIndex : Integer = 0; Const ALength : Integer = -1); |
Procedure InsertBytes(Var VBytes : TRESTDWBytes; Const ADestIndex : Integer; Const ASource : TRESTDWBytes; Const ASourceIndex : Integer = 0); |
Procedure InsertByte(Var VBytes : TRESTDWBytes; Const AByte : Byte; Const AIndex : Integer); |
Function ByteIndex(Const AByte : Byte; Const ABytes : TRESTDWBytes; Const AStartIndex : Integer = 0) : Integer; |
Function ByteToHex(Const AByte : Byte) : String; |
Procedure RemoveBytes(Var VBytes : TRESTDWBytes; Const ACount : Integer; Const AIndex : Integer = 0); |
Procedure ExpandBytes(Var VBytes : TRESTDWBytes; Const AIndex : Integer; Const ACount : Integer; Const AFillByte : Byte = 0); |
Procedure AppendByte(Var VBytes : TRESTDWBytes; Const AByte : Byte); |
Function ByteIsInEOL(Const ABytes : TRESTDWBytes; Const AIndex : Integer) : Boolean; |
Function GetByteCount(Const AChars : TRESTDWWideChars) : Integer; Overload; |
Function GetByteCount(Const AChars : TRESTDWWideChars; ACharIndex, ACharCount : Integer) : Integer; Overload; |
Function GetByteCount(Const AChars : PDWWideChar; ACharCount : Integer) : Integer; Overload; |
Function IsHeaderMediaType(Const AHeaderLine, AMediaType : String) : Boolean; |
Function MediaTypeMatches(Const AValue, AMediaType : String) : Boolean; |
Function PosRDW(Const ASubStr, AStr : String; AStartPos : DWInt32): DWInt32; |
Function RDWStrToInt(Const S : String; ADefault : Integer = 0) : Integer; |
Procedure RDWDelete(Var s : String; AOffset, ACount : Integer); |
Function FindFirstNotOf(Const AFind, AText : String; Const ALength : Integer = -1; Const AStartPos : Integer = 1) : Integer; |
Function FindFirstOf(Const AFind, AText : String; Const ALength : Integer = -1; Const AStartPos : Integer = 1) : Integer; |
Function BytesToStringRaw(Const AValue : TRESTDWBytes) : String; Overload; |
Function BytesToStringRaw(Const AValue : TRESTDWBytes; Const AStartIndex : Integer; Const ALength : Integer = -1) : String; Overload; |
Function IsHeaderMediaTypes(Const AHeaderLine : String; Const AMediaTypes : Array Of String) : Boolean; |
Function IsHeaderValue(Const AHeaderLine : String; Const AValue : String) : Boolean; |
Function GetMIMEDefaultFileExt(Const MIMEType : String) : TFileName; |
Function GetMIMETypeFromFile(Const AFile : TFileName) : String; |
Function GetUniqueFileName(Const APath, APrefix, AExt : String) : String; |
Function MakeTempFilename(Const APath : TFileName = '') : TFileName; |
Function CopyFileTo(Const Source, Destination : TFileName) : Boolean; |
Function OffsetFromUTC: TDateTime; |
Function UTCOffsetToStr(Const AOffset : TDateTime; Const AUseGMTStr : Boolean = False) : String; |
Function LocalDateTimeToGMT(Const Value : TDateTime; Const AUseGMTStr : Boolean = False) : String; |
Function GMTToLocalDateTime(S : String) : TDateTime; |
Function RawStrInternetToDateTime(Var Value : String; Var VDateTime : TDateTime) : Boolean; |
Function IsNumeric(Const AChar : Char) : Boolean; Overload; |
Function IsNumeric(Const AString : String; Const ALength : Integer; Const AIndex : Integer = 1) : Boolean; Overload; |
Function restdwPos(Const Substr, S : String) : Integer; |
Function RemoveHeaderEntry(Const AHeader, AEntry : String; AQuoteType : TRESTDWHeaderQuotingType) : String; Overload; |
Function RemoveHeaderEntry(Const AHeader, AEntry : String; Var VOld : String; AQuoteType : TRESTDWHeaderQuotingType) : String; overload; |
Function BytesToInt16(Const AValue : TRESTDWBytes; Const AIndex : Integer = 0) : DWInt32; |
Function BytesToInt32(Const AValue : TRESTDWBytes; Const AIndex : Integer = 0) : DWInt32; |
Function BytesToInt64(Const AValue : TRESTDWBytes; Const AIndex : Integer = 0) : DWInt64; |
Procedure DeleteInvalidChar(Var Value : String); |
Function BooleanToString(aValue : Boolean) : String; |
Function StringToBoolean(aValue : String) : Boolean; |
Procedure CopyRDWString(Const ASource : String; Var VDest : TRESTDWBytes; Const ADestIndex : Integer; Const ALength : Integer = -1); Overload; |
Procedure CopyRDWString(Const ASource : String; Const ASourceIndex : Integer; Var VDest : TRESTDWBytes; Const ADestIndex : Integer; Const ALength : Integer = -1); Overload; |
Function GetTokenString(Value : String) : String; |
Function GetBearerString(Value : String) : String; |
Function GetPairJSONStr(Status, MessageText : String; Encoding : TEncodeSelect = esUtf8) : String; |
Function GetPairJSONInt(Status : Integer; MessageText : String; Encoding : TEncodeSelect = esUtf8) : String; |
Function GetStringUnicode(Value : String) : String; |
Function GetStringEncode(Value : String; DatabaseCharSet : TDatabaseCharSet) : String; |
Function GetStringDecode(Value : String; DatabaseCharSet : TDatabaseCharSet) : String; |
Constantes
B64Table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; |
QuoteSpecials : Array[TRESTDWHeaderQuotingType] Of String = ('', '()<>@,;:\"./', '()<>@,;:\"/[]?=', '()<>@,;:\"/[]?={} '#9); |
LF = #10; |
CR = #13; |
EOL = CR + LF; |
CHAR0 = #0; |
BACKSPACE = #8; |
TAB = #9; |
CHAR32 = #32; |
LWS = TAB + CHAR32; |
Descrição
Funções e Procedimentos
Function EncodeStrings(Value : String ;DatabaseCharSet : TDatabaseCharSet) : String; |
Function DecodeStrings(Value : String ;DatabaseCharSet : TDatabaseCharSet) : String; |
Function EncodeStream(Value : TStream) : String; |
Function DecodeStream(Value : String) : TMemoryStream; |
Function BytesToString(Const bin : TRESTDWBytes) : String; Overload; |
Function BytesToString(Const AValue : TRESTDWBytes; Const AStartIndex : Integer; Const ALength : Integer = -1) : String; Overload; |
Function restdwLength(Const ABuffer : String; Const ALength : Integer = -1; Const AIndex : Integer = 1) : Integer; Overload; |
Function restdwLength(Const ABuffer : TRESTDWBytes; Const ALength : Integer = -1; Const AIndex : Integer = 0) : Integer; Overload; |
Function restdwLength(Const ABuffer : TStream; Const ALength : TRESTDWStreamSize = -1) : TRESTDWStreamSize; Overload; |
Function restdwMax(Const AValueOne, AValueTwo : Int64) : Int64; |
Function restdwMin(Const AValueOne, AValueTwo : Int64) : Int64; |
Function StringToBytes(AStr : String) : TRESTDWBytes; |
Function StreamToBytes(Stream : TStream) : TRESTDWBytes; |
Function StringToFieldType(Const S : String) : Integer; |
Function Escape_chars(s : String) : String; |
Function Unescape_chars(s : String) : String; |
Function HexToBookmark(Value : String) : TRESTDWBytes; |
Function BookmarkToHex(Value : TRESTDWBytes) : String; |
Procedure CopyStringList(Const Source, Dest : TStringList); |
Function RemoveBackslashCommands(Value : String) : String; |
Function RESTDWFileExists(sFile, BaseFilePath : String) : Boolean; |
Function TravertalPathFind(Value : String) : Boolean; |
Function GetEventName(Value : String) : String; |
Function ExtractHeaderSubItem(Const AHeaderLine, ASubItem : String; QuotingType : TRESTDWHeaderQuotingType) : String; |
Function ReadLnFromStream(AStream : TStream; Var VLine : String; AMaxLineLength : Integer = -1) : Boolean; Overload; |
Function ReadLnFromStream(AStream : TStream; AMaxLineLength : Integer = -1; AExceptionIfEOF : Boolean = False) : String; Overload; |
Function ValueFromIndex(AStrings : TStrings; Const AIndex : Integer) : String; |
Function restdwValueFromIndex(AStrings : TStrings; Const AIndex : Integer) : String; |
Function iif(ATest : Boolean; Const ATrue : Integer; Const AFalse : Integer) : Integer; |
Function CharRange(Const AMin, AMax : Char) : String; |
Function CharIsInSet(Const AString : String; Const ACharPos : Integer; Const ASet : String) : Boolean; |
Function ExtractHeaderItem(Const AHeaderLine : String) : String; |
Function TextIsSame(Const A1, A2 : String) : Boolean; |
Function WrapText(Const ALine, ABreakStr, ABreakChars : String; MaxCol : Integer) : String; |
Function Fetch(Var AInput : String; Const ADelim : String = ''; Const ADelete : Boolean = True; Const ACaseSensitive : Boolean = True) : String; |
Function InternalAnsiPos(Const Substr, S : String) : Integer; |
Function PosInStrArray(Const SearchStr : String; Const Contents : Array Of String; Const CaseSensitive : Boolean = True) : Integer; |
Function ReplaceHeaderSubItem(Const AHeaderLine, ASubItem, AValue : String; AQuoteType : TRESTDWHeaderQuotingType) : String; Overload; |
Function ReplaceHeaderSubItem(Const AHeaderLine, ASubItem, AValue : String; Var VOld : String; AQuoteType : TRESTDWHeaderQuotingType) : String; Overload; |
Procedure SplitHeaderSubItems(AHeaderLine : String; AItems : TStrings; AQuoteType : TRESTDWHeaderQuotingType); |
Function TextStartsWith(Const S, SubS : String) : Boolean; |
Function TextEndsWith(Const S, SubS : String) : Boolean; |
Function Max(Const AValueOne, AValueTwo : Int64) : Int64; |
Function Min(Const AValueOne, AValueTwo : Int64) : Int64; |
Function RawToBytes(Const AValue : String; Const ASize : Integer) : TRESTDWBytes; |
Procedure CopyBytes(Const ASource : TRESTDWBytes; Const ASourceIndex : Integer; Var VDest : TRESTDWBytes; Const ADestIndex : Integer; Const ALength : Integer); |
Function ByteIsInSet(Const ABytes : TRESTDWBytes; Const AIndex : Integer; Const ASet : TRESTDWBytes) : Boolean; |
Function ToBytes(Const AValue : String) : TRESTDWBytes; Overload; |
Function ToBytes(Const AValue : Char) : TRESTDWBytes; Overload; |
Function ToBytes(Const AValue : String; Const ALength : Integer; Const AIndex : Integer = 1) : TRESTDWBytes; Overload; |
Function ToBytes(Const AValue : TRESTDWBytes; Const ASize : Integer; Const AIndex : Integer = 0) : TRESTDWBytes; Overload; |
Function GetBytes(Const AChars : PDWWideChar; ACharCount : Integer) : TRESTDWBytes; Overload; |
Function GetBytes(Const AChars : PDWWideChar; ACharCount : Integer; ABytes : PByte; AByteCount : Integer) : Integer; Overload; |
Function GetBytes(Const AChars : TRESTDWWideChars; ACharIndex, ACharCount : Integer; Var VBytes : TRESTDWBytes; AByteIndex : Integer) : Integer; Overload; |
Function GetBytes(Const AChars : PDWWideChar; ACharCount : Integer; Var VBytes : TRESTDWBytes; AByteIndex : Integer) : Integer; Overload; |
Function GetBytes(Const AChars : String) : TRESTDWBytes; Overload; |
Function GetChars(Const ABytes : TRESTDWBytes; AByteIndex, AByteCount : Integer) : TRESTDWWideChars; Overload; |
Function GetChars(Const ABytes : TRESTDWBytes) : TRESTDWWideChars; Overload; |
Function GetChars(Const ABytes : PByte; AByteCount : Integer) : TRESTDWWideChars; Overload; |
Function GetChars(Const ABytes : TRESTDWBytes; AByteIndex, AByteCount : Integer; Var VChars : TRESTDWWideChars; ACharIndex : Integer) : Integer; Overload; |
Function GetChars(Const ABytes : PByte; AByteCount : Integer; Var VChars : TRESTDWWideChars; ACharIndex : Integer) : Integer; Overload; |
Function GetChars(Const ABytes : PByte; AByteCount : Integer; AChars : PDWWideChar; ACharCount : Integer) : Integer; Overload; |
Function GetCharCount(Const ABytes : TRESTDWBytes; AByteIndex, AByteCount : Integer) : Integer; Overload; |
Function GetCharCount(Const ABytes : PByte; AByteCount : Integer) : Integer; Overload; |
Function ValidateBytes(Const ABytes : TRESTDWBytes; AByteIndex, AByteCount, ANeeded : Integer) : PByte; Overload; |
Function ValidateBytes(Const ABytes : TRESTDWBytes; AByteIndex, AByteCount : Integer) : PByte; Overload; |
Function ReadBytesFromStream(Const AStream : TStream; Var ABytes : TRESTDWBytes; Const Count : TRESTDWStreamSize; Const AIndex : Integer = 0) : TRESTDWStreamSize; |
Procedure WriteBytesToStream(Const AStream : TStream; Const ABytes : TRESTDWBytes; Const ASize : Integer = -1; Const AIndex : Integer = 0); |
Procedure StringToStream(AStream : TStream; Const AStr : String); |
procedure WriteStringToStream(AStream : TStream; Const AStr : String; Const ALength : Integer = -1; Const AIndex : Integer = 1); Overload; |
Function ReadStringFromStream(AStream : TStream; ASize : Integer = -1) : String; Overload; |
Procedure AppendBytes(Var VBytes : TRESTDWBytes; Const AToAdd : TRESTDWBytes; Const AIndex : Integer = 0; Const ALength : Integer = -1); |
Procedure InsertBytes(Var VBytes : TRESTDWBytes; Const ADestIndex : Integer; Const ASource : TRESTDWBytes; Const ASourceIndex : Integer = 0); |
Procedure InsertByte(Var VBytes : TRESTDWBytes; Const AByte : Byte; Const AIndex : Integer); |
Function ByteIndex(Const AByte : Byte; Const ABytes : TRESTDWBytes; Const AStartIndex : Integer = 0) : Integer; |
Function ByteToHex(Const AByte : Byte) : String; |
Procedure RemoveBytes(Var VBytes : TRESTDWBytes; Const ACount : Integer; Const AIndex : Integer = 0); |
Procedure ExpandBytes(Var VBytes : TRESTDWBytes; Const AIndex : Integer; Const ACount : Integer; Const AFillByte : Byte = 0); |
Procedure AppendByte(Var VBytes : TRESTDWBytes; Const AByte : Byte); |
Function ByteIsInEOL(Const ABytes : TRESTDWBytes; Const AIndex : Integer) : Boolean; |
Function GetByteCount(Const AChars : TRESTDWWideChars) : Integer; Overload; |
Function GetByteCount(Const AChars : TRESTDWWideChars; ACharIndex, ACharCount : Integer) : Integer; Overload; |
Function GetByteCount(Const AChars : PDWWideChar; ACharCount : Integer) : Integer; Overload; |
Function IsHeaderMediaType(Const AHeaderLine, AMediaType : String) : Boolean; |
Function MediaTypeMatches(Const AValue, AMediaType : String) : Boolean; |
Function PosRDW(Const ASubStr, AStr : String; AStartPos : DWInt32): DWInt32; |
Function RDWStrToInt(Const S : String; ADefault : Integer = 0) : Integer; |
Procedure RDWDelete(Var s : String; AOffset, ACount : Integer); |
Function FindFirstNotOf(Const AFind, AText : String; Const ALength : Integer = -1; Const AStartPos : Integer = 1) : Integer; |
Function FindFirstOf(Const AFind, AText : String; Const ALength : Integer = -1; Const AStartPos : Integer = 1) : Integer; |
Function BytesToStringRaw(Const AValue : TRESTDWBytes) : String; Overload; |
Function BytesToStringRaw(Const AValue : TRESTDWBytes; Const AStartIndex : Integer; Const ALength : Integer = -1) : String; Overload; |
Function IsHeaderMediaTypes(Const AHeaderLine : String; Const AMediaTypes : Array Of String) : Boolean; |
Function IsHeaderValue(Const AHeaderLine : String; Const AValue : String) : Boolean; |
Function GetMIMEDefaultFileExt(Const MIMEType : String) : TFileName; |
Function GetMIMETypeFromFile(Const AFile : TFileName) : String; |
Function GetUniqueFileName(Const APath, APrefix, AExt : String) : String; |
Function MakeTempFilename(Const APath : TFileName = '') : TFileName; |
Function CopyFileTo(Const Source, Destination : TFileName) : Boolean; |
Function OffsetFromUTC: TDateTime; |
Function UTCOffsetToStr(Const AOffset : TDateTime; Const AUseGMTStr : Boolean = False) : String; |
Function LocalDateTimeToGMT(Const Value : TDateTime; Const AUseGMTStr : Boolean = False) : String; |
Function GMTToLocalDateTime(S : String) : TDateTime; |
Function RawStrInternetToDateTime(Var Value : String; Var VDateTime : TDateTime) : Boolean; |
Function IsNumeric(Const AChar : Char) : Boolean; Overload; |
Function IsNumeric(Const AString : String; Const ALength : Integer; Const AIndex : Integer = 1) : Boolean; Overload; |
Function restdwPos(Const Substr, S : String) : Integer; |
Function RemoveHeaderEntry(Const AHeader, AEntry : String; AQuoteType : TRESTDWHeaderQuotingType) : String; Overload; |
Function RemoveHeaderEntry(Const AHeader, AEntry : String; Var VOld : String; AQuoteType : TRESTDWHeaderQuotingType) : String; overload; |
Function BytesToInt16(Const AValue : TRESTDWBytes; Const AIndex : Integer = 0) : DWInt32; |
Function BytesToInt32(Const AValue : TRESTDWBytes; Const AIndex : Integer = 0) : DWInt32; |
Function BytesToInt64(Const AValue : TRESTDWBytes; Const AIndex : Integer = 0) : DWInt64; |
Procedure DeleteInvalidChar(Var Value : String); |
Function BooleanToString(aValue : Boolean) : String; |
Function StringToBoolean(aValue : String) : Boolean; |
Procedure CopyRDWString(Const ASource : String; Var VDest : TRESTDWBytes; Const ADestIndex : Integer; Const ALength : Integer = -1); Overload; |
Procedure CopyRDWString(Const ASource : String; Const ASourceIndex : Integer; Var VDest : TRESTDWBytes; Const ADestIndex : Integer; Const ALength : Integer = -1); Overload; |
Function GetTokenString(Value : String) : String; |
Function GetBearerString(Value : String) : String; |
Function GetPairJSONStr(Status, MessageText : String; Encoding : TEncodeSelect = esUtf8) : String; |
Function GetPairJSONInt(Status : Integer; MessageText : String; Encoding : TEncodeSelect = esUtf8) : String; |
Function GetStringUnicode(Value : String) : String; |
Function GetStringEncode(Value : String; DatabaseCharSet : TDatabaseCharSet) : String; |
Function GetStringDecode(Value : String; DatabaseCharSet : TDatabaseCharSet) : String; |
Constantes
B64Table = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; |
QuoteSpecials : Array[TRESTDWHeaderQuotingType] Of String = ('', '()<>@,;:\"./', '()<>@,;:\"/[]?=', '()<>@,;:\"/[]?={} '#9); |
LF = #10; |
CR = #13; |
EOL = CR + LF; |
CHAR0 = #0; |
BACKSPACE = #8; |
TAB = #9; |
CHAR32 = #32; |
LWS = TAB + CHAR32; |
Gerado por PasDoc 0.16.0.