全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:5925
推到 Plurk!
推到 Facebook!

新細明體更新套件 Unicode 3.1 版 增加約五萬個漢字

 
conundrum
尊榮會員


發表:893
回覆:1272
積分:643
註冊:2004-01-06

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-09-17 21:07:24 IP:218.175.xxx.xxx 未訂閱
新細明體更新套件 安裝本更新檔案,您的系統便可升級到支援 Unicode 3.1 版,同時可使用到多達 70195 個繁、簡中文和日、韓的漢字,增加約五萬個漢字。 需 Windows XP 或 2003 Server 版本才能安裝。 http://download.microsoft.com/download/b/b/b/bbb0f7a5-d25c-4420-accc-2c0a7f51033b/PMingLiU Update Pack.msi http://www.unicode.org/reports/tr27/ http://leoboard.cpatch.org/cgi-bin/topic.cgi?forum=21&topic=1080 PMingLiU Update Pack.msi 約26.934kb 請自行下載 台灣災難都是事後算帳 無人飛行載具(Unmanned Aerial Vehicle,UAV)為什麼沒大量應用於救災行列
Main Chen
高階會員


發表:29
回覆:135
積分:127
註冊:2002-10-07

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-09-20 20:49:47 IP:220.229.xxx.xxx 未訂閱
引言: 安裝本更新檔案,您的系統便可升級到支援 Unicode 3.1 版,同時可使用到多達 70195 個繁、簡中文和日、韓的漢字,增加約五萬個漢字。
感謝提供資訊, 另外有個疑問, 就是 WideString 一個字為 Word 大小, 那用到 ExtB 的中文字則需要 2Word, 應該如何用 copy 指令可正確的取字.
conundrum
尊榮會員


發表:893
回覆:1272
積分:643
註冊:2004-01-06

發送簡訊給我
#3 引用回覆 回覆 發表時間:2005-09-21 18:24:14 IP:218.175.xxx.xxx 未訂閱
http://www.google.com.tw/url?sa=U&start=1&q=http://fundementals.sourceforge.net/cUtils.html&e=10342 
 
http://delphi.ktop.com.tw/loadfile.php?TOPICID=24634678&CC=550942
//資料太長改上傳檔案資料    http://delphi.ktop.com.tw/quicksearch.exe/quicksearch?SearchStr=WideString+
//KTOP搜索資料
 
Units: Utils: Source          {$INCLUDE ..\cDefines.inc}
unit cUtils;    {                                                                              }
{                    Miscellaneous utility functions v3.36                     }
{                                                                              }
{             This unit is copyright ?2000-2004 by David J Butler              }
{                                                                              }
{                  This unit is part of Delphi Fundamentals.                   }
{                     Its original file name is cUtils.pas                     }
{                      It was generated 1 Aug 2004 23:29.                      }
{       The latest version is available from the Fundamentals home page        }
{                     http://fundementals.sourceforge.net/                     }
{                                                                              }
{                I invite you to use this unit, free of charge.                }
{        I invite you to distibute this unit, but it must be for free.         }
{             I also invite you to contribute to its development,              }
{             but do not distribute a modified copy of this file.              }
{                                                                              }
{          A forum is available on SourceForge for general discussion          }
{             http://sourceforge.net/forum/forum.php?forum_id=2117             }
{                                                                              }
{                                                                              }
{ Revision history:                                                            }
{   2000/02/02  0.01  Initial version                                          }
{   2000/03/08  1.02  Added RealArray / IntegerArray functions.                }
{   2000/04/10  1.03  Added Append, Renamed Delete to Remove and added         }
{                     StringArrays.                                            }
{   2000/05/03  1.04  Added Path functions.                                    }
{   2000/05/08  1.05  Revision.                                                }
{                     188 lines interface. 1171 lines implementation.          }
{   2000/06/01  1.06  Added Range and Dup constructors for dynamic arrays.     }
{   2000/06/03  1.07  Added ArrayInsert functions.                             }
{   2000/06/06  1.08  Moved bit functions from cMaths.                         }
{   2000/06/08  1.09  Removed TInteger, TReal, TRealArray, TIntegerArray.      }
{                     299 lines interface. 2019 lines implementations.         }
{   2000/06/10  1.10  Added linked lists for Integer, Int64, Extended and      }
{                     String.                                                  }
{                     518 lines interface. 3396 lines implementation.          }
{   2000/06/14  1.11  cUtils now generated from a template using a source      }
{                     pre-processor that uses cUtils.                          }
{                     560 lines interface. 1328 lines implementation.          }
{                     Produced source: 644 lines interface, 4716 lines         }
{                     implementation.                                          }
{   2000/07/04  1.12  Revision for Fundamentals release.                       }
{   2000/07/24  1.13  Added TrimArray functions.                               }
{   2000/07/26  1.14  Added Difference functions.                              }
{   2000/09/02  1.15  Added RemoveDuplicates functions.                        }
{                     Added Count functions.                                   }
{                     Fixed bug in Sort.                                       }
{   2000/09/27  1.16  Fixed bug in ArrayInsert.                                }
{   2000/11/29  1.17  Moved SetFPUPrecision to cSysUtils.                      }
{   2001/05/03  1.18  Improved bit functions. Added Pascal versions of         }
{                     assembly routines.                                       }
{                     Templ: 867 lines interface, 2886 lines implementation.   }
{                     Source: 939 lines interface, 9796 lines implementation.  }
{   2001/05/13  1.19  Added CharCount.                                         }
{   2001/05/15  1.20  Added PosNext (ClassType, ObjectArray).                  }
{   2001/05/18  1.21  Added hashing functions from cMaths.                     }
{   2001/07/07  1.22  Added TBinaryTreeNode.                                   }
{   2001/11/11  2.23  Revision.                                                }
{   2002/01/03  2.24  Moved EncodeBase64, DecodeBase64 from cMaths and         }
{                     optimized. Added LongWordToHex, HexToLongWord.           }
{   2002/03/30  2.25  Fixed bug in DecodeBase64.                               }
{   2002/04/02  2.26  Removed dependencies on all other units (incl. Delphi    )
{                     units) to remove initialization code associated with     }
{                     SysUtils. This allows usage of cUtils in projects        }
{                     and still have very small binaries.                      }
{                     Fixed bug in LongWordToHex.                              }
{   2002/05/31  3.27  Refactored for Fundamentals 3.                           }
{                     Moved linked lists to cLinkedLists.                      }
{   2002/08/09  3.28  Added HashInteger.                                       }
{   2002/10/06  3.29  Renamed Cond to iif.                                     }
{   2002/12/12  3.30  Small revisions.                                         }
{   2003/03/14  3.31  Removed ApproxZero. Added FloatZero, FloatsEqual and     }
{                     FloatsCompare. Added documentation and test cases for    }
{                     comparison functions.                                    }
{                     Added support for Currency type.                         }
{   2003/07/27  3.32  Added fast ZeroMem and FillMem routines.                 }
{   2003/09/11  3.33  Added InterfaceArray functions.                          }
{   2004/01/18  3.34  Added WideStringArray functions.                         }
{   2004/07/24  3.35  Optimizations of Sort functions.                         }
{   2005/08/01  3.36  Improved validation in base conversion routines.         }
{                                                                              }
interface    const
  UnitName      = 'cUtils';
  UnitVersion   = '3.36';
  UnitDesc      = 'Miscelleanous utility functions';
  UnitCopyright = 'Copyright (c) 2000-2004 David J Butler';      FundamentalsMajorVersion = 3;
  FundamentalsMinorVersion = 28;        {$WRITEABLECONST OFF}    {                                                                              }
{ Integer types                                                                }
{   Byte      unsigned 8 bits                                                  }
{   Word      unsigned 16 bits                                                 }
{   LongWord  unsigned 32 bits                                                 }
{   ShortInt  signed 8 bits                                                    }
{   SmallInt  signed 16 bits                                                   }
{   LongInt   signed 32 bits                                                   }
{   Int64     signed 64 bits                                                   }
{   Integer   signed system word                                               }
{   Cardinal  unsigned system word                                             }
{                                                                              }
type
  Int8      = ShortInt;
  Int16     = SmallInt;
  Int32     = LongInt;
  LargeInt  = Int64;
  PLargeInt = ^LargeInt;
  Word8     = Byte;
  Word16    = Word;
  Word32    = LongWord;      {$IFDEF DELPHI5_DOWN}
  PBoolean  = ^Boolean;
  PByte     = ^Byte;
  PWord     = ^Word;
  PLongWord = ^LongWord;
  PShortInt = ^ShortInt;
  PSmallInt = ^SmallInt;
  PLongInt  = ^LongInt;
  PInteger  = ^Integer;
  PInt64    = ^Int64;
  {$ENDIF}      LongIntRec = packed record
    case Integer of
      0 : (Lo, Hi : Word);
      1 : (Words  : Array[0..1] of Word);
      2 : (Bytes  : Array[0..3] of Byte);
  end;    const
  MinByte     = Low(Byte);
  MaxByte     = High(Byte);
  MinWord     = Low(Word);
  MaxWord     = High(Word);
  MinShortInt = Low(ShortInt);
  MaxShortInt = High(ShortInt);
  MinSmallInt = Low(SmallInt);
  MaxSmallInt = High(SmallInt);
  MinLongWord = LongWord(Low(LongWord));
  MaxLongWord = LongWord(High(LongWord));
  MinLongInt  = LongInt(Low(LongInt));
  MaxLongInt  = LongInt(High(LongInt));
  MaxInt64    = Int64(High(Int64));
  MinInt64    = Int64(Low(Int64));
  MinInteger  = Integer(Low(Integer));
  MaxInteger  = Integer(High(Integer));
  MinCardinal = Cardinal(Low(Cardinal));
  MaxCardinal = Cardinal(High(Cardinal));    const
  BitsPerByte      = 8;
  BitsPerWord      = 16;
  BitsPerLongWord  = 32;
  BytesPerCardinal = Sizeof(Cardinal);
  BitsPerCardinal  = BytesPerCardinal * 8;    { Min returns smallest of A and B                                              }
{ Max returns greatest of A and B                                              }
function  MinI(const A, B: Integer): Integer;
function  MaxI(const A, B: Integer): Integer;
function  MinC(const A, B: Cardinal): Cardinal;
function  MaxC(const A, B: Cardinal): Cardinal;    { Clip returns Value if in Low..High range, otherwise Low or High              }
function  Clip(const Value: Integer; const Low, High: Integer): Integer;
function  ClipByte(const Value: Integer): Integer;
function  ClipWord(const Value: Integer): Integer;
function  ClipLongWord(const Value: Int64): LongWord;
function  SumClipI(const A, I: Integer): Integer;
function  SumClipC(const A: Cardinal; const I: Integer): Cardinal;    { InXXXRange returns True if A in range of type XXX                            }
function  InByteRange(const A: Int64): Boolean;
function  InWordRange(const A: Int64): Boolean;
function  InLongWordRange(const A: Int64): Boolean;
function  InShortIntRange(const A: Int64): Boolean;
function  InSmallIntRange(const A: Int64): Boolean;
function  InLongIntRange(const A: Int64): Boolean;        {                                                                              }
{ Real types                                                                   }
{                                                                              }
{   Floating point:                                                            }
{     Single    32 bits  7-8 significant digits                                }
{     Double    64 bits  15-16 significant digits                              }
{     Extended  80 bits  19-20 significant digits                              }
{                                                                              }
{   Fixed point:                                                               }
{     Currency  64 bits  19-20 significant digits, 4 after the decimal point.  }
{                                                                              }
type
  Float  = Extended;
  PFloat = ^Float;    const
  MinSingle   : Single   = 1.5E-45;
  MaxSingle   : Single   = 3.4E+38;
  MinDouble   : Double   = 5.0E-324;
  MaxDouble   : Double   = 1.7E+308;
  MinExtended : Extended = 3.4E-4932;
  MaxExtended : Extended = 1.1E+4932;
  {$IFDEF FREEPASCAL}
  MinCurrency = -922337203685477.5807;
  MaxCurrency = 922337203685477.5807;
  {$ELSE}
  MinCurrency : Currency = -922337203685477.5807;
  MaxCurrency : Currency = 922337203685477.5807;
  {$ENDIF}    {$IFDEF DELPHI5_DOWN}
type
  PSingle   = ^Single;
  PDouble   = ^Double;
  PExtended = ^Extended;
  PCurrency = ^Currency;
{$ENDIF}    type
  TExtended = packed record
    Case Boolean of
      True: (
        Mantissa : packed Array[0..1] of LongWord; { MSB of [1] is the normalized 1 bit }
        Exponent : Word; { MSB is the sign bit }
      );
      False: (Value: Extended);
  end;    const
  ExtendedNan      : TExtended = (Mantissa:($FFFFFFFF, $FFFFFFFF); Exponent:$7FFF);
  ExtendedInfinity : TExtended = (Mantissa:($00000000, $80000000); Exponent:$7FFF);    { Min returns smallest of A and B                                              }
{ Max returns greatest of A and B                                              }
{ Clip returns Value if in Low..High range, otherwise Low or High              }
function  MinF(const A, B: Extended): Extended;
function  MaxF(const A, B: Extended): Extended;
function  ClipF(const Value: Extended; const Low, High: Extended): Extended;    { InXXXRange returns True if A in range of type XXX                            }
function  InSingleRange(const A: Extended): Boolean;
function  InDoubleRange(const A: Extended): Boolean;
function  InCurrencyRange(const A: Extended): Boolean; overload;
function  InCurrencyRange(const A: Int64): Boolean; overload;        {                                                                              }
{ Bit functions                                                                }
{   All bit functions operate on 32-bit values (LongWord).                     }
{                                                                              }
function  ClearBit(const Value, BitIndex: LongWord): LongWord;
function  SetBit(const Value, BitIndex: LongWord): LongWord;
function  IsBitSet(const Value, BitIndex: LongWord): Boolean;
function  ToggleBit(const Value, BitIndex: LongWord): LongWord;
function  IsHighBitSet(const Value: LongWord): Boolean;    function  SetBitScanForward(const Value: LongWord): Integer; overload;
function  SetBitScanForward(const Value, BitIndex: LongWord): Integer; overload;
function  SetBitScanReverse(const Value: LongWord): Integer; overload;
function  SetBitScanReverse(const Value, BitIndex: LongWord): Integer; overload;
function  ClearBitScanForward(const Value: LongWord): Integer; overload;
function  ClearBitScanForward(const Value, BitIndex: LongWord): Integer; overload;
function  ClearBitScanReverse(const Value: LongWord): Integer; overload;
function  ClearBitScanReverse(const Value, BitIndex: LongWord): Integer; overload;    function  ReverseBits(const Value: LongWord): LongWord; overload;
function  ReverseBits(const Value: LongWord; const BitCount: Integer): LongWord; overload;
function  SwapEndian(const Value: LongWord): LongWord;
Procedure SwapEndianBuf(var Buf; const Count: Integer);
function  TwosComplement(const Value: LongWord): LongWord;    function  RotateLeftBits(const Value: LongWord; const Bits: Byte): LongWord;
function  RotateRightBits(const Value: LongWord; const Bits: Byte): LongWord;    function  BitCount(const Value: LongWord): LongWord;
function  IsPowerOfTwo(const Value: LongWord): Boolean;    function  LowBitMask(const HighBitIndex: LongWord): LongWord;
function  HighBitMask(const LowBitIndex: LongWord): LongWord;
function  RangeBitMask(const LowBitIndex, HighBitIndex: LongWord): LongWord;    function  SetBitRange(const Value: LongWord;
          const LowBitIndex, HighBitIndex: LongWord): LongWord;
function  ClearBitRange(const Value: LongWord;
          const LowBitIndex, HighBitIndex: LongWord): LongWord;
function  ToggleBitRange(const Value: LongWord;
          const LowBitIndex, HighBitIndex: LongWord): LongWord;
function  IsBitRangeSet(const Value: LongWord;
          const LowBitIndex, HighBitIndex: LongWord): Boolean;
function  IsBitRangeClear(const Value: LongWord;
          const LowBitIndex, HighBitIndex: LongWord): Boolean;    const
  BitMaskTable: Array[0..31] of LongWord =
    ($00000001, $00000002, $00000004, $00000008,
     $00000010, $00000020, $00000040, $00000080,
     $00000100, $00000200, $00000400, $00000800,
     $00001000, $00002000, $00004000, $00008000,
     $00010000, $00020000, $00040000, $00080000,
     $00100000, $00200000, $00400000, $00800000,
     $01000000, $02000000, $04000000, $08000000,
     $10000000, $20000000, $40000000, $80000000);        {                                                                              }
{ Sets                                                                         }
{                                                                              }
type
  CharSet = Set of Char;
  ByteSet = Set of Byte;
  PCharSet = ^CharSet;
  PByteSet = ^ByteSet;    const
  CompleteCharSet = [#0..#255];
  CompleteByteSet = [0..255];    function  AsCharSet(const C: Array of Char): CharSet;
function  AsByteSet(const C: Array of Byte): ByteSet;
procedure ComplementChar(var C: CharSet; const Ch: Char);
procedure ClearCharSet(var C: CharSet);
procedure FillCharSet(var C: CharSet);
procedure ComplementCharSet(var C: CharSet);
procedure AssignCharSet(var DestSet: CharSet; const SourceSet: CharSet); overload;
procedure Union(var DestSet: CharSet; const SourceSet: CharSet); overload;
procedure Difference(var DestSet: CharSet; const SourceSet: CharSet); overload;
procedure Intersection(var DestSet: CharSet; const SourceSet: CharSet); overload;
procedure XORCharSet(var DestSet: CharSet; const SourceSet: CharSet);
function  IsSubSet(const A, B: CharSet): Boolean;
function  IsEqual(const A, B: CharSet): Boolean; overload;
function  IsEmpty(const C: CharSet): Boolean;
function  IsComplete(const C: CharSet): Boolean;
function  CharCount(const C: CharSet): Integer; overload;
procedure ConvertCaseInsensitive(var C: CharSet);
function  CaseInsensitiveCharSet(const C: CharSet): CharSet;        {                                                                              }
{ Range functions                                                              }
{                                                                              }
function  IntRangeLength(const Low, High: Integer): Int64;
function  IntRangeAdjacent(const Low1, High1, Low2, High2: Integer): Boolean;
function  IntRangeOverlap(const Low1, High1, Low2, High2: Integer): Boolean;
function  IntRangeHasElement(const Low, High, Element: Integer): Boolean;    function  IntRangeIncludeElement(var Low, High: Integer;
          const Element: Integer): Boolean;
function  IntRangeIncludeElementRange(var Low, High: Integer;
          const LowElement, HighElement: Integer): Boolean;    function  CardinalRangeLength(const Low, High: Cardinal): Int64;
function  CardinalRangeAdjacent(const Low1, High1, Low2, High2: Cardinal): Boolean;
function  CardinalRangeOverlap(const Low1, High1, Low2, High2: Cardinal): Boolean;
function  CardinalRangeHasElement(const Low, High, Element: Cardinal): Boolean;    function  CardinalRangeIncludeElement(var Low, High: Cardinal;
          const Element: Cardinal): Boolean;
function  CardinalRangeIncludeElementRange(var Low, High: Cardinal;
          const LowElement, HighElement: Cardinal): Boolean;        {                                                                              }
{ Swap                                                                         }
{                                                                              }
procedure Swap(var X, Y: Boolean); overload;
procedure Swap(var X, Y: Byte); overload;
procedure Swap(var X, Y: Word); overload;
procedure Swap(var X, Y: LongWord); overload;
procedure Swap(var X, Y: ShortInt); overload;
procedure Swap(var X, Y: SmallInt); overload;
procedure Swap(var X, Y: LongInt); overload;
procedure Swap(var X, Y: Int64); overload;
procedure Swap(var X, Y: Single); overload;
procedure Swap(var X, Y: Double); overload;
procedure Swap(var X, Y: Extended); overload;
procedure Swap(var X, Y: Currency); overload;
procedure Swap(var X, Y: String); overload;
procedure Swap(var X, Y: WideString); overload;
procedure Swap(var X, Y: Pointer); overload;
procedure Swap(var X, Y: TObject); overload;
procedure SwapObjects(var X, Y);        {                                                                              }
{ Inline if                                                                    }
{                                                                              }
{   iif returns TrueValue if Expr is True, otherwise it returns FalseValue.    }
{                                                                              }
function  iif(const Expr: Boolean; const TrueValue: Integer;
          const FalseValue: Integer = 0): Integer; overload;
function  iif(const Expr: Boolean; const TrueValue: Int64;
          const FalseValue: Int64 = 0): Int64; overload;
function  iif(const Expr: Boolean; const TrueValue: Extended;
          const FalseValue: Extended = 0.0): Extended; overload;
function  iif(const Expr: Boolean; const TrueValue: String;
          const FalseValue: String = ''): String; overload;
function  iif(const Expr: Boolean; const TrueValue: TObject;
          const FalseValue: TObject = nil): TObject; overload;        {                                                                              }
{ Comparison                                                                   }
{                                                                              }
type
  TCompareResult = (
      crLess,
      crEqual,
      crGreater,
      crUndefined);
  TCompareResultSet = Set of TCompareResult;    function  ReverseCompareResult(const C: TCompareResult): TCompareResult;        {                                                                              }
{ Direct comparison                                                            }
{                                                                              }
{   Compare(I1, I2) returns crLess if I1 < I2, crEqual if I1 = I2 or           }
{   crGreater if I1 > I2.                                                      }
{                                                                              }
function  Compare(const I1, I2: Boolean): TCompareResult; overload;
function  Compare(const I1, I2: Integer): TCompareResult; overload;
function  Compare(const I1, I2: Int64): TCompareResult; overload;
function  Compare(const I1, I2: Extended): TCompareResult; overload;
function  Compare(const I1, I2: String): TCompareResult; overload;
function  WideCompare(const I1, I2: WideString): TCompareResult;        {                                                                              }
{ Approximate comparison of floating point values                              }
{                                                                              }
{   FloatZero, FloatOne, FloatsEqual and FloatsCompare are functions for       }
{   comparing floating point numbers based on a fixed CompareDelta difference  }
{   between the values. This means that values are considered equal if the     }
{   unsigned difference between the values are less than CompareDelta.         }
{                                                                              }
const
  // Minimum CompareDelta values for the different floating point types:
  // The values were chosen to be slightly higher than the minimum value that
  // the floating-point type can store.
  SingleCompareDelta   = 1.0E-34;
  DoubleCompareDelta   = 1.0E-280;
  ExtendedCompareDelta = 1.0E-4400;      // Default CompareDelta is set to SingleCompareDelta. This allows any type
  // of floating-point value to be compared with any other.
  DefaultCompareDelta = SingleCompareDelta;    function  FloatZero(const A: Extended;
          const CompareDelta: Extended = DefaultCompareDelta): Boolean;
function  FloatOne(const A: Extended;
          const CompareDelta: Extended = DefaultCompareDelta): Boolean;    function  FloatsEqual(const A, B: Extended;
          const CompareDelta: Extended = DefaultCompareDelta): Boolean;
function  FloatsCompare(const A, B: Extended;
          const CompareDelta: Extended = DefaultCompareDelta): TCompareResult;        {                                                                              }
{ Scaled approximate comparison of floating point values                       }
{                                                                              }
{   ApproxEqual and ApproxCompare are functions for comparing floating point   }
{   numbers based on a scaled order of magnitude difference between the        }
{   values. CompareEpsilon is the ratio applied to the largest of the two      }
{   exponents to give the maximum difference (CompareDelta) for comparison.    }
{                                                                              }
{   For example:                                                               }
{                                                                              }
{   When the CompareEpsilon is 1.0E-9, the result of                           }
{                                                                              }
{   ApproxEqual(1.0E+20, 1.000000001E+20) = False, but the result of           }
{   ApproxEqual(1.0E+20, 1.0000000001E+20) = True, ie the first 9 digits of    }
{   the mantissas of the values must be the same.                              }
{                                                                              }
{   Note that for A <> 0.0, the value of ApproxEqual(A, 0.0) will always be    }
{   False. Rather use the unscaled FloatZero, FloatsEqual and FloatsCompare    }
{   functions when specifically testing for zero.                              }
{                                                                              }
const
  // Smallest (most sensitive) CompareEpsilon values allowed for the different
  // floating point types:
  SingleCompareEpsilon   = 1.0E-5;
  DoubleCompareEpsilon   = 1.0E-13;
  ExtendedCompareEpsilon = 1.0E-17;      // Default CompareEpsilon is set for half the significant digits of the
  // Extended type.
  DefaultCompareEpsilon  = 1.0E-10;    function  ApproxEqual(const A, B: Extended;
          const CompareEpsilon: Double = DefaultCompareEpsilon): Boolean;
function  ApproxCompare(const A, B: Extended;
          const CompareEpsilon: Double = DefaultCompareEpsilon): TCompareResult;        {                                                                              }
{ Special floating-point values                                                }
{                                                                              }
{   FloatIsInfinity is True if A is a positive or negative infinity.           }
{   FloatIsNaN is True if A is Not-a-Number.                                   }
{                                                                              }
function  FloatIsInfinity(const A: Extended): Boolean;
function  FloatIsNaN(const A: Extended): Boolean;        {                                                                              }
{ Base Conversion                                                              }
{                                                                              }
{   EncodeBase64 converts a binary string (S) to a base64 string using        }
{   Alphabet. if Pad is True, the result will be padded with PadChar to be a   }
{   multiple of PadMultiple.                                                   }
{                                                                              }
{   DecodeBase64 converts a base64 string using Alphabet (64 characters for   }
{   values 0-63) to a binary string.                                           }
{                                                                              }
const
  s_HexDigitsUpper: String[16] = '0123456789ABCDEF';
  s_HexDigitsLower: String[16] = '0123456789abcdef';    function  IsHexChar(const Ch: Char): Boolean;
function  IsHexWideChar(const Ch: WideChar): Boolean;
function  HexCharValue(const Ch: Char): Byte;
function  HexWideCharValue(const Ch: WideChar): Byte;    function  LongWordToBin(const I: LongWord; const Digits: Byte = 0): String;
function  LongWordToOct(const I: LongWord; const Digits: Byte = 0): String;
function  LongWordToHex(const I: LongWord; const Digits: Byte = 0;
          const UpperCase: Boolean = True): String;
function  LongWordToStr(const I: LongWord; const Digits: Byte = 0): String;    function  IsValidBinStr(const S: String): Boolean;
function  IsValidOctStr(const S: String): Boolean;
function  IsValidDecStr(const S: String): Boolean;
function  IsValidHexStr(const S: String): Boolean;    { xxxStrToLongWord converts a number in a specific base to a LongWord value.   }
{ Valid is False on return if the string could not be converted.               }
function  BinStrToLongWord(const S: String; var Valid: Boolean): LongWord;
function  OctStrToLongWord(const S: String; var Valid: Boolean): LongWord;
function  DecStrToLongWord(const S: String; var Valid: Boolean): LongWord;
function  HexStrToLongWord(const S: String; var Valid: Boolean): LongWord;    function  EncodeBase64(const S, Alphabet: String; const Pad: Boolean = False;
          const PadMultiple: Integer = 4; const PadChar: Char = '='): String;
function  DecodeBase64(const S, Alphabet: String; const PadSet: CharSet = []): String;    const
  b64_MIMEBase64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
  b64_UUEncode   = ' !"#$%&''()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_';
  b64_XXEncode   = '+-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';    function  MIMEBase64Decode(const S: String): String;
function  MIMEBase64Encode(const S: String): String;
function  UUDecode(const S: String): String;
function  XXDecode(const S: String): String;    function  BytesToHex(const P: Pointer; const Count: Integer;
          const UpperCase: Boolean = True): String;        {                                                                              }
{ Type conversion                                                              }
{                                                                              }
function  PointerToStr(const P: Pointer): String;
function  StrToPointer(const S: String): Pointer;
function  ObjectClassName(const O: TObject): String;
function  ClassClassName(const C: TClass): String;
function  ObjectToStr(const O: TObject): String;
function  ClassToStr(const C: TClass): String;
function  CharSetToStr(const C: CharSet): String;
function  StrToCharSet(const S: String): CharSet;        {                                                                              }
{ Hashing functions                                                            }
{                                                                              }
{   HashBuf uses a every byte in the buffer to calculate a hash.               }
{                                                                              }
{   HashStrBuf/HashStr is a general purpose string hashing function.           }
{   For large strings, HashStr will sample up to 48 bytes from the string.     }
{                                                                              }
{   If Slots = 0 the hash value is in the LongWord range (0-$FFFFFFFF),        }
{   otherwise the value is in the range from 0 to Slots-1. Note that the       }
{   'mod' operation, which is used when Slots <> 0, is comparitively slow.     }
{                                                                              }
function  HashBuf(const Buf; const BufSize: Integer;
          const Slots: LongWord = 0): LongWord;
function  HashStrBuf(const StrBuf: Pointer; const StrLength: Integer;
          const Slots: LongWord = 0): LongWord;
function  HashStrBufNoCase(const StrBuf: Pointer; const StrLength: Integer;
          const Slots: LongWord = 0): LongWord;
function  HashStr(const S: String; const Slots: LongWord = 0;
          const CaseSensitive: Boolean = True): LongWord;
function  HashInteger(const I: 
        
系統時間:2024-05-18 6:21:01
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!