Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.1 KiB

  1. //
  2. // mxToolKit (c) 1999 by Mete Ciragan
  3. //
  4. // file: mxstring.cpp
  5. // implementation: all
  6. // last modified: May 04 1999, Mete Ciragan
  7. // copyright: The programs and associated files contained in this
  8. // distribution were developed by Mete Ciragan. The programs
  9. // are not in the public domain, but they are freely
  10. // distributable without licensing fees. These programs are
  11. // provided without guarantee or warrantee expressed or
  12. // implied.
  13. //
  14. #include "mxtk/mxstring.h"
  15. #include <stdio.h>
  16. #include <stdlib.h>
  17. #include <string.h>
  18. #include <ctype.h>
  19. int
  20. mx_strncasecmp (const char *s1, const char *s2, int count)
  21. {
  22. #ifdef WIN32
  23. return _strnicmp (s1, s2, count);
  24. #else
  25. return strncasecmp (s1, s2, count);
  26. #endif
  27. }
  28. int
  29. mx_strcasecmp (const char *s1, const char *s2)
  30. {
  31. #ifdef WIN32
  32. return _stricmp (s1, s2);
  33. #else
  34. return strcasecmp (s1, s2);
  35. #endif
  36. }
  37. char *
  38. mx_strlower (char *str)
  39. {
  40. int i;
  41. for (i = (int)strlen (str) - 1; i >= 0; i--)
  42. str[i] = (char)tolower (str[i]);
  43. return str;
  44. }