case sensitiv 
Author Message
 case sensitiv

Hi
I am comparing input from a text file to filenames i a
dir, but it is case sensitiv. Hov do i disable that.??


Tue, 05 Oct 2004 15:54:45 GMT  
 case sensitiv
str1 = "A StRiNg"str2 = "a sTrinG"
If StrComp( str1, str2, 0) Then wscript.echo "Strings contain same text!"Else
wscript.echo "Strings contain different text!"End If
If StrComp( str1, str2, 1) Then wscript.echo "Strings contain same binary
data!"Else wscript.echo "Strings contain different binary data!"End If


Quote:
> Hi
> I am comparing input from a text file to filenames i a
> dir, but it is case sensitiv. Hov do i disable that.??



Tue, 05 Oct 2004 18:16:56 GMT  
 case sensitiv

Quote:

> str1 = "A StRiNg"str2 = "a sTrinG"
> If StrComp( str1, str2, 0) Then wscript.echo "Strings contain same text!"Else
> wscript.echo "Strings contain different text!"End If

Alternativly:

str1 = "Txt"

If Lcase(str1) = "txt" Then
  wscript.echo "Strings contain same text (case disregarded)"
End If

--
torgeir



Tue, 05 Oct 2004 23:31:34 GMT  
 case sensitiv
Thanks u realy saved my day  :)

Quote:
>-----Original Message-----

>> str1 = "A StRiNg"str2 = "a sTrinG"
>> If StrComp( str1, str2, 0) Then wscript.echo "Strings

contain same text!"Else
Quote:
>> wscript.echo "Strings contain different text!"End If

>Alternativly:

>str1 = "Txt"

>If Lcase(str1) = "txt" Then
>  wscript.echo "Strings contain same text (case
disregarded)"
>End If

>--
>torgeir

>.



Fri, 08 Oct 2004 03:47:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. "select...case", multiples cases not possible ?

2. Select Case and Case 0 To 9

3. VBScript Select Case vs VB Select Case

4. Converting a Upper Case String to Upper and Lower Case

5. Switch/Case with multiple tests in case

6. Postscript test cases

7. Case statements in Postscript

8. Case Sensitive VBScript in Active Server Pages?

9. Strange case of the disappearing Treeview

10. Case control structure in PS?

11. Help needed on Select Case

12. Problem with Boolean expression in Case?

 

 
Powered by phpBB® Forum Software