Unit bsUtils

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

Utility Library

Overview

Functions and Procedures

function BytesToString(const Value: TBytes):BSString;
function BytesToUTF8String(const Value:TBytes):BSString;
function BytesToAnsiString(const Value:TBytes):BSString;
function StringToBytes(const Value: BSString):TBytes;
function UTF8StringToBytes(const Value:BSString ):TBytes;
function DecodeBase64String(const Input: BSString): BSString;
function EncodeBase64String(const Input: BSString): BSString;
procedure DecodeBase64Stream(Input, Output: TStream);
procedure EncodeBase64Stream(Input, Output: TStream);
function EncodeFileToBase64String(const AFileName: BSString): BSString;
function StreamToStringStream(const AStream:TStream): TStringStream;
function StreamToString(const AStream:TStream):BSString;
function StartsWith(Substr:String; AStr: String):Boolean;
function EndsWith(Substr:String; AStr: String):Boolean;
function JSONEncode(const AStr:BSString):BSString;
function LocalMachineEndian : TbsEndian;
function SwapWord(Value: Word): Word; overload;
procedure SwapWord(P: PBSWordArray; Count: LongInt); overload;
function SwapLongInt(const Value: LongInt): LongInt; overload;
function SwapLongWord(const Value: LongWord): LongWord; overload;
procedure SwapLongWord(P: PLongWord; Count: LongInt); overload;
function SwapSingle(const Value: Single): Single; overload;
function SwapDouble(const Value: Double): Double; overload;
procedure SwapBytes(AUnitSize: Byte; ABytes: PByte; ACount:Integer);
function FormatSettings_EN: TFormatSettings;
function XML_LoadDoc(const AValue :BSString): TBSXMLDocument;
function XML_FindNode(const ANode:TBSXMLNode; const ANodeName:BSString): TBSXMLNode;
function XML_GetNodeValue(const ANode: TBSXMLNode): BSString;
function XML_GetAttributeValue(const ANode: TBSXMLNode; const AttributeName:BSString): BSString;
function XML_HasChildNodes(const ANode:TBSXMLNode): Boolean;
function XML_GetAttributeCount(const ANode:TBSXMLNode):Integer;
function XML_IsTextNode(const ANode:TBSXMLNode): Boolean;
function XML_GetNodeText(const ANode:TBSXMLNode): BSString;
function XML_GetNodeXml(const ANode:TBSXMLNode): BSString;

Types

TBSXMLNode = IXMLNode;
TBSXMLDocument = IXMLDocument;

Description

Functions and Procedures

function BytesToString(const Value: TBytes):BSString;
 
function BytesToUTF8String(const Value:TBytes):BSString;
 
function BytesToAnsiString(const Value:TBytes):BSString;
 
function StringToBytes(const Value: BSString):TBytes;
 
function UTF8StringToBytes(const Value:BSString ):TBytes;
 
function DecodeBase64String(const Input: BSString): BSString;
 
function EncodeBase64String(const Input: BSString): BSString;
 
procedure DecodeBase64Stream(Input, Output: TStream);
 
procedure EncodeBase64Stream(Input, Output: TStream);
 
function EncodeFileToBase64String(const AFileName: BSString): BSString;
 
function StreamToStringStream(const AStream:TStream): TStringStream;
 
function StreamToString(const AStream:TStream):BSString;
 
function StartsWith(Substr:String; AStr: String):Boolean;
 
function EndsWith(Substr:String; AStr: String):Boolean;
 
function JSONEncode(const AStr:BSString):BSString;
 
function LocalMachineEndian : TbsEndian;

Endian

function SwapWord(Value: Word): Word; overload;
 
procedure SwapWord(P: PBSWordArray; Count: LongInt); overload;
 
function SwapLongInt(const Value: LongInt): LongInt; overload;
 
function SwapLongWord(const Value: LongWord): LongWord; overload;
 
procedure SwapLongWord(P: PLongWord; Count: LongInt); overload;
 
function SwapSingle(const Value: Single): Single; overload;
 
function SwapDouble(const Value: Double): Double; overload;
 
procedure SwapBytes(AUnitSize: Byte; ABytes: PByte; ACount:Integer);
 
function FormatSettings_EN: TFormatSettings;
 
function XML_LoadDoc(const AValue :BSString): TBSXMLDocument;
 
function XML_FindNode(const ANode:TBSXMLNode; const ANodeName:BSString): TBSXMLNode;
 
function XML_GetNodeValue(const ANode: TBSXMLNode): BSString;
 
function XML_GetAttributeValue(const ANode: TBSXMLNode; const AttributeName:BSString): BSString;
 
function XML_HasChildNodes(const ANode:TBSXMLNode): Boolean;
 
function XML_GetAttributeCount(const ANode:TBSXMLNode):Integer;
 
function XML_IsTextNode(const ANode:TBSXMLNode): Boolean;
 
function XML_GetNodeText(const ANode:TBSXMLNode): BSString;
 
function XML_GetNodeXml(const ANode:TBSXMLNode): BSString;
 

Types

TBSXMLNode = IXMLNode;
 
TBSXMLDocument = IXMLDocument;
 

Generated by PasDoc 0.14.0.