syswide.inc 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. {
  2. *********************************************************************
  3. $Id$
  4. Copyright (C) 2002-2005 by Florian Klaempfl
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. *********************************************************************
  17. }
  18. function WideUpperCase(const s : WideString) : WideString;
  19. begin
  20. result:=widestringmanager.UpperWideStringProc(s);
  21. end;
  22. function WideLowerCase(const s : WideString) : WideString;
  23. begin
  24. result:=widestringmanager.LowerWideStringProc(s);
  25. end;
  26. function WideCompareStr(const s1, s2 : WideString) : PtrInt;
  27. begin
  28. result:=widestringmanager.CompareWideStringProc(s1,s2);
  29. end;
  30. function WideSameStr(const s1, s2 : WideString) : Boolean;
  31. begin
  32. result:=widestringmanager.CompareWideStringProc(s1,s2)=0;
  33. end;
  34. function WideCompareText(const s1, s2 : WideString) : PtrInt;
  35. begin
  36. result:=widestringmanager.CompareTextWideStringProc(s1,s2);
  37. end;
  38. function WideSameText(const s1, s2 : WideString) : Boolean;
  39. begin
  40. result:=widestringmanager.CompareTextWideStringProc(s1,s2)=0;
  41. end;
  42. { we've no templates, but with includes we can simulate this :) }
  43. {$macro on}
  44. {$define INWIDEFORMAT}
  45. {$define TFormatString:=widestring}
  46. {$define TFormatChar:=widechar}
  47. Function WideFormat (Const Fmt : WideString; const Args : Array of const) : WideString;
  48. {$i sysformt.inc}
  49. {$undef TFormatString}
  50. {$undef TFormatChar}
  51. {$undef INWIDEFORMAT}
  52. {$macro off}
  53. {
  54. $Log$
  55. Revision 1.5 2005-02-26 15:00:14 florian
  56. + WideSameStr
  57. Revision 1.4 2005/02/26 10:21:17 florian
  58. + implemented WideFormat
  59. + some Widestring stuff implemented
  60. * some Widestring stuff fixed
  61. Revision 1.3 2005/02/14 17:13:31 peter
  62. * truncate log
  63. Revision 1.2 2005/02/03 18:40:02 florian
  64. * compilation with 1.0.x fixed
  65. + infrastructure for WideCompareText implemented
  66. Revision 1.1 2005/02/01 20:22:50 florian
  67. * improved widestring infrastructure manager
  68. }