sysansi.inc 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {
  2. *********************************************************************
  3. Copyright (C) 2002 by Florian Klaempfl
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. *********************************************************************
  16. }
  17. Function AnsiCompareFileName(const S1, S2: string): SizeInt;
  18. begin
  19. If FileNameCaseSensitive then
  20. Result:=AnsiCompareStr(S1,S2) // Compare case sensitive
  21. else
  22. Result:=AnsiCompareText(S1,S2); // Compare case insensitive. No MBCS yet.
  23. end;
  24. Function SameFileName(const S1, S2: string): Boolean;
  25. begin
  26. Result:=AnsiCompareFileName(S1,S2)=0;
  27. end;
  28. Function AnsiLowerCaseFileName(const S: string): string;
  29. begin
  30. Result:=AnsiLowerCase(S); // No locale support or MBCS yet.
  31. end;
  32. Function AnsiUpperCaseFileName(const S: string): string;
  33. begin
  34. Result:=AnsiUpperCase(S); // No locale support or MBCS yet.
  35. end;
  36. Function AnsiPos(const Substr, S: string): SizeInt;
  37. begin
  38. Result:=Pos(Substr,S); // No MBCS yet.
  39. end;
  40. Function AnsiStrPos(Str, SubStr: PChar): PChar;
  41. begin
  42. Result:=StrPos(Str,Substr);
  43. end;
  44. Function AnsiStrRScan(Str: PChar; Chr: Char): PChar;
  45. begin
  46. Result:=StrRScan(Str,Chr);
  47. end;
  48. Function AnsiStrScan(Str: PChar; Chr: Char): PChar;
  49. begin
  50. Result:=StrScan(Str,Chr);
  51. end;