sysansi.inc 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. {
  2. *********************************************************************
  3. $Id$
  4. Copyright (C) 2002 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 AnsiCompareFileName(const S1, S2: string): SizeInt;
  19. begin
  20. If FileNameCaseSensitive then
  21. Result:=AnsiCompareStr(S1,S2) // Compare case sensitive
  22. else
  23. Result:=AnsiCompareText(S1,S2); // Compare case insensitive. No MBCS yet.
  24. end;
  25. Function SameFileName(const S1, S2: string): Boolean;
  26. begin
  27. Result:=AnsiCompareFileName(S1,S2)=0;
  28. end;
  29. Function AnsiLowerCaseFileName(const S: string): string;
  30. begin
  31. Result:=AnsiLowerCase(S); // No locale support or MBCS yet.
  32. end;
  33. Function AnsiUpperCaseFileName(const S: string): string;
  34. begin
  35. Result:=AnsiUpperCase(S); // No locale support or MBCS yet.
  36. end;
  37. Function AnsiPos(const Substr, S: string): SizeInt;
  38. begin
  39. Result:=Pos(Substr,S); // No MBCS yet.
  40. end;
  41. Function AnsiStrPos(Str, SubStr: PChar): PChar;
  42. begin
  43. Result:=StrPos(Str,Substr);
  44. end;
  45. Function AnsiStrRScan(Str: PChar; Chr: Char): PChar;
  46. begin
  47. Result:=StrRScan(Str,Chr);
  48. end;
  49. Function AnsiStrScan(Str: PChar; Chr: Char): PChar;
  50. begin
  51. Result:=StrScan(Str,Chr);
  52. end;
  53. {
  54. $Log$
  55. Revision 1.5 2005-02-14 17:13:31 peter
  56. * truncate log
  57. }