home *** CD-ROM | disk | FTP | other *** search
/ Enigma Amiga Life 113 / EnigmaAmiga113CD.iso / software / sviluppo / easygui_os12 / source / hybrid / strcmp.e < prev    next >
Encoding:
Text File  |  2000-06-11  |  986 b   |  42 lines

  1. /* RST: hybrid "any kick" replacement for
  2.    utility library Stricmp() and Strnicmp()
  3.  
  4.    Please do not redistribute modified versions of this code. If you have
  5.    any ideas how to make things better contact me at metamonk@yahoo.com.
  6.  
  7.    Also, please do not distribute further 'hybrid/#?' modules since there
  8.    is already a large amount of additional stuff in work. Contact me...
  9.  
  10.    This code is Copyright (c) 2000, Ralf 'hippie2000' Steines, and
  11.    inherits the legal state from the original EasyGUI disctribution. */
  12.  
  13. -> shares utilitybase with caller
  14.  
  15. OPT MODULE
  16. OPT EXPORT
  17.  
  18. MODULE 'utility'
  19.  
  20. PROC stricmp(str1,str2)
  21.   DEF res
  22.   IF utilitybase
  23.     res:=Stricmp(str1,str2)
  24.   ELSE
  25.     res:=-OstrCmp(str1,str2)
  26.   ENDIF
  27. ENDPROC res
  28.  
  29. PROC strnicmp(str1,str2,len)
  30.   DEF s1[256]:STRING,s2[256]:STRING,res
  31.   IF utilitybase
  32.     res:=Strnicmp(str1,str2,len)
  33.   ELSE
  34.     StrCopy(s1,str1)
  35.     LowerStr(s1)
  36.     StrCopy(s2,str2)
  37.     LowerStr(s2)
  38.     res:=-OstrCmp(s1,s2,len)
  39.   ENDIF
  40. ENDPROC res
  41.  
  42.