MMSTRING.INT 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. {========================================================================}
  2. {= (c) 1995-98 SwiftSoft Ronald Dittrich =}
  3. {========================================================================}
  4. {= All Rights Reserved =}
  5. {========================================================================}
  6. {= D 01099 Dresden = Tel.: +0351-8012255 =}
  7. {= Loewenstr.7a = info@swiftsoft.de =}
  8. {========================================================================}
  9. {= Actual versions on http://www.swiftsoft.de/mmtools.html =}
  10. {========================================================================}
  11. {= This code is for reference purposes only and may not be copied or =}
  12. {= distributed in any format electronic or otherwise except one copy =}
  13. {= for backup purposes. =}
  14. {= =}
  15. {= No Delphi Component Kit or Component individually or in a collection=}
  16. {= subclassed or otherwise from the code in this unit, or associated =}
  17. {= .pas, .dfm, .dcu, .asm or .obj files may be sold or distributed =}
  18. {= without express permission from SwiftSoft. =}
  19. {= =}
  20. {= For more licence informations please refer to the associated =}
  21. {= HelpFile. =}
  22. {========================================================================}
  23. {= $Date: 20.01.1998 - 18:00:00 $ =}
  24. {========================================================================}
  25. unit MMString;
  26. {$I COMPILER.INC}
  27. interface
  28. uses
  29. {$IFDEF WIN32}
  30. Windows,
  31. Messages,
  32. {$ELSE}
  33. WinProcs,
  34. WinTypes,
  35. {$ENDIF}
  36. SysUtils;
  37. {$IFNDEF WIN32}
  38. procedure SetLength(var StrX: string; Len: integer);
  39. procedure SetString(var StrX: string; Buffer: PChar; Len: integer);
  40. function Trim(const StrX: string): string;
  41. function TrimLeft(const StrX: string): string;
  42. function TrimRight(const StrX: string): string;
  43. {$ENDIF}
  44. function Replicate(const StrX: string; NoTimes: Byte): string;
  45. procedure DeleteLeft(var strX: string; Border: Char);
  46. procedure DeleteRight(var strX: string; Border: Char);
  47. procedure PadEnds(var StrX: string; ch: Char; Len: integer);
  48. procedure PadLeft(var StrX: string; ch: Char; Len: integer);
  49. procedure PadRight(var StrX: string; ch: Char; Len: integer);
  50. function LeftEnd(const StrX: string; Border: Char): string;
  51. function RightEnd(const StrX: string; Border: Char): string;
  52. function LeftStr(const StrX: string; Len: integer): string;
  53. function RightStr(const StrX: string; Len: integer): string;
  54. function Equal(const StrX1, StrX2: string): Boolean;
  55. function Encrypt(const StrX: string; Key: Word): string;
  56. function Decrypt(const StrX: string; Key: Word): string;
  57. implementation