|
-
Sep 9th, 2000, 09:21 PM
#1
I have used this before but I cant remember exactly how I implement it...To make vb compare everything case sensitively.. For example
If "kewl" = "Kewl" then
msgbox "This wouldnt fire becuase they dont match in case."
end if
and using Lcase is not an option because im working on a code compiler and its case sensitive using same keys for same operation..For example in perl
/u
and
/U
are two different things...
I thought it was something you put at the very top of your code like
Option Case Sensitive..But that doesnt work..I know its one of those Option things tho..
-
Sep 9th, 2000, 09:29 PM
#2
Addicted Member
this is the way:
after = Lcase( before ) 'Put before in LowerCase
after = Ucase( before ) 'Put before in UpperCase
-
Sep 9th, 2000, 09:41 PM
#3
no I know about that already..I cant use that option because it wont work if you think about it. Plus that would be soooo slow on a 250 keyword list. that gets fired every few seconds..right now its fast very fast..
-
Sep 9th, 2000, 09:47 PM
#4
Addicted Member
you canot do that ?? :
For CURRENTWORD = 0 to 250
if Lcase(word1) = Lcase(word2) then
'Welldone
else
'WORNG !!!!!
end if
next CURRENTWORD
'FINISH
-
Sep 9th, 2000, 10:05 PM
#5
No I cant do that because I dont know if the word is going to be uppercase or lowercase...Also the word being compared is pulled out of a textfile and it needs to get compared against itself..
-
Sep 9th, 2000, 10:09 PM
#6
_______
<?>
use Option Compare Text
or is it Option Text Compare
or
Code:
'StrComp function returns a number...0 if matched, 1 if false
'compare strings to see if you have a matching string or not
'if you use 1 as the comparison factor it
'forces a text comparison
strMyCompare = StrComp(string1, string2, 1) 'comparison function
If StrMyComp = 0 then 'true match
'do bla bla bla because string1 = string2 'do bla bla bla
'or... if false then
Else
'do bla bla bla because txtOne <> textTwo.text
End If
[Edited by HeSaidJoe on 09-09-2000 at 11:11 PM]
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 9th, 2000, 10:30 PM
#7
Joe thats what I was looking for.. Option Compare Text.. Thanks..I forgot what the command was for it lol..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|