compare text

Results 1 to 5 of 5

Thread: compare text

  1. #1
    MAO Guest

    Default compare text

    how i can set asp to be non case sensitive in the compare text procedures ?<BR><BR>Thanks a lot<BR><BR>Maurizio <BR>Italy

  2. #2
    Jason Buck Guest

    Default RE: compare text

    In the 2 strings that you want to compare, convert them to UCase.<BR>If Ucase(str1) = UCase(str2) Then<BR>dowhatever<BR>Else<BR>dowhatever<BR>End if<BR><BR>I hope this helps.<BR><BR>Respectfully<BR>Jason<BR>webmaster@w wnj.com

  3. #3
    mao Guest

    Default Thankyou jason but ...

    thank you for the answare, i be sure this is a good solution, but i try to find a way for set asp in the case insensitive mode for avoid to change the web pages, maybe is possible to do this .... <BR>Thank again to all <BR>Maurizio ( Milan , Italy )

  4. #4
    Jason Buck Guest

    Default RE: Thankyou jason but ...

    Sorry that I didn&#039t give you the full answer that you were looking for.<BR><BR>Here is a link to msdn.microsoft.scripting which provides the answer you are looking for.<BR><BR>http://msdn.microsoft.com/scripting/vbscript/doc/vsfctStrComp.htm<BR><BR>I hope that this is the information you are looking for, otherwise I will feel pretty dumb. Giving you two wrong answers in one day.<BR><BR>Dim MyStr1, MyStr2, MyComp<BR>MyStr1 = "ABCD": MyStr2 = "abcd" &#039 Define variables.<BR>MyComp = StrComp(MyStr1, MyStr2, 1) &#039 Returns 0. &#039equal<BR>MyComp = StrComp(MyStr1, MyStr2, 0) &#039 Returns -1. &#039 less than <BR>MyComp = StrComp(MyStr2, MyStr1) &#039 Returns 1. &#039 gr8tr than<BR><BR>Please let me know.<BR><BR>Respectfully,<BR><BR>Jason<BR>webmast er@wnj.com


  5. #5
    Lien Guest

    Default RE: compare text

    I know my response kind of late, however, I post it anyway just in case somebody else need it. <BR><BR>if (strcomp(str1, str2, 1)) = 0 then &#039meaning "abc"="ABC"<BR> do something<BR>else<BR> do something<BR>end if<BR><BR>Hope this help<BR><BR>Lien<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •