Too much to list
This commit is contained in:
parent
bf22de16fa
commit
e337c2b676
|
@ -65,16 +65,6 @@ Begin
|
||||||
Result := sayi;
|
Result := sayi;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function Byte2Hex (numb: Byte) : String;
|
|
||||||
Const
|
|
||||||
HexChars : Array[0..15] of Char = '0123456789abcdef';
|
|
||||||
begin
|
|
||||||
// setlength(result, 2);
|
|
||||||
Byte2Hex[0] := #2;
|
|
||||||
Byte2Hex[1] := HexChars[numb shr 4];
|
|
||||||
Byte2Hex[2] := HexChars[numb and 15];
|
|
||||||
end;
|
|
||||||
|
|
||||||
Function Digest2String (Digest: String) : String;
|
Function Digest2String (Digest: String) : String;
|
||||||
var
|
var
|
||||||
count : byte;
|
count : byte;
|
||||||
|
|
|
@ -35,6 +35,7 @@ Function WildMatch (WildCard, FName: String; IgnoreCase: Boolean) : Boole
|
||||||
Function DirCreate (Str: String) : Boolean;
|
Function DirCreate (Str: String) : Boolean;
|
||||||
Function DirExists (Str: String) : Boolean;
|
Function DirExists (Str: String) : Boolean;
|
||||||
Function DirSlash (Str: String) : String;
|
Function DirSlash (Str: String) : String;
|
||||||
|
Function DirLast (CurPath: String) : String;
|
||||||
Function DirChange (Dir: String) : Boolean;
|
Function DirChange (Dir: String) : Boolean;
|
||||||
Procedure DirClean (Path: String; Exempt: String);
|
Procedure DirClean (Path: String; Exempt: String);
|
||||||
Function DirFiles (Str: String) : LongInt;
|
Function DirFiles (Str: String) : LongInt;
|
||||||
|
@ -359,6 +360,17 @@ Begin
|
||||||
Result := Str;
|
Result := Str;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Function DirLast (CurPath: String) : String;
|
||||||
|
Begin
|
||||||
|
If CurPath[Length(CurPath)] = PathSep Then
|
||||||
|
Delete (CurPath, Length(CurPath), 1);
|
||||||
|
|
||||||
|
While (CurPath[Length(CurPath)] <> PathSep) and (CurPath <> '') Do
|
||||||
|
Delete (CurPath, Length(CurPath), 1);
|
||||||
|
|
||||||
|
Result := DirSlash(CurPath);
|
||||||
|
End;
|
||||||
|
|
||||||
Function JustPath (Str: String) : String;
|
Function JustPath (Str: String) : String;
|
||||||
Var
|
Var
|
||||||
Count : Byte;
|
Count : Byte;
|
||||||
|
|
|
@ -28,8 +28,6 @@
|
||||||
-------------------------------------------------------------------------
|
-------------------------------------------------------------------------
|
||||||
}
|
}
|
||||||
|
|
||||||
{$DEFINE NEWEDITOR}
|
|
||||||
|
|
||||||
{.$DEFINE DEBUG}
|
{.$DEFINE DEBUG}
|
||||||
{$DEFINE RELEASE}
|
{$DEFINE RELEASE}
|
||||||
{.$DEFINE LOGGING}
|
{.$DEFINE LOGGING}
|
||||||
|
|
|
@ -14,7 +14,7 @@ Function strZero (Num: LongInt) : String;
|
||||||
Function strComma (Num: LongInt) : String;
|
Function strComma (Num: LongInt) : String;
|
||||||
Function strI2S (Num: LongInt) : String;
|
Function strI2S (Num: LongInt) : String;
|
||||||
Function strH2I (Str: String) : LongInt;
|
Function strH2I (Str: String) : LongInt;
|
||||||
Function strI2H (Num: LongInt) : String;
|
Function strI2H (Num: LongInt; Idx: Byte) : String;
|
||||||
Function strS2I (Str: String) : LongInt;
|
Function strS2I (Str: String) : LongInt;
|
||||||
Function strI2O (Num: LongInt) : String;
|
Function strI2O (Num: LongInt) : String;
|
||||||
Function strR2S (Num: Real; Deci: Byte) : String;
|
Function strR2S (Num: Real; Deci: Byte) : String;
|
||||||
|
@ -34,6 +34,7 @@ Function strReplace (Str, OldStr, NewStr: String) : String;
|
||||||
Function strWide2Str (Var Str: String; MaxLen: Byte) : String;
|
Function strWide2Str (Var Str: String; MaxLen: Byte) : String;
|
||||||
Function strYN (Bol: Boolean) : String;
|
Function strYN (Bol: Boolean) : String;
|
||||||
Function LoCase (Ch: Char) : Char;
|
Function LoCase (Ch: Char) : Char;
|
||||||
|
Function Byte2Hex (Num: Byte) : String;
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
|
|
||||||
|
@ -161,13 +162,11 @@ Begin
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Function strI2H (Num: LongInt) : String;
|
Function strI2H (Num: LongInt; Idx: Byte) : String;
|
||||||
Var
|
Var
|
||||||
Ch : Char;
|
Ch : Char;
|
||||||
Idx : Byte;
|
|
||||||
Begin
|
Begin
|
||||||
Result := '00000000';
|
Result := strRep('0', Idx);
|
||||||
Idx := 8;
|
|
||||||
|
|
||||||
While Num <> 0 Do Begin
|
While Num <> 0 Do Begin
|
||||||
Ch := Chr(48 + Byte(Num) AND $0F);
|
Ch := Chr(48 + Byte(Num) AND $0F);
|
||||||
|
@ -427,4 +426,13 @@ Begin
|
||||||
If Bol Then Result := 'Yes' Else Result := 'No';
|
If Bol Then Result := 'Yes' Else Result := 'No';
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
Function Byte2Hex (Num: Byte) : String;
|
||||||
|
Const
|
||||||
|
HexChars : Array[0..15] of Char = '0123456789abcdef';
|
||||||
|
Begin
|
||||||
|
Byte2Hex[0] := #2;
|
||||||
|
Byte2Hex[1] := HexChars[Num SHR 4];
|
||||||
|
Byte2Hex[2] := HexChars[Num AND 15];
|
||||||
|
End;
|
||||||
|
|
||||||
End.
|
End.
|
||||||
|
|
Loading…
Reference in New Issue