Hi,
I am developing a program that uses a significant amount of string manipulation. I frequently have to check to see if one string occurs in another. e.g.
The thing is, because the original string (in this case desc2$) is created by user input, the sub string "Error" could actually be "error", "ERROR", "Error" or any combination of upper and lower case characters, and Instr appears to be case-sensitive. Now I know that I can cheat by doings something like this:
but wonder if there is a more efficient way as I have to do this a lot of times!
Thanks.
I am developing a program that uses a significant amount of string manipulation. I frequently have to check to see if one string occurs in another. e.g.
If (Instr(desc2$,"Error")<>0) Then .......
The thing is, because the original string (in this case desc2$) is created by user input, the sub string "Error" could actually be "error", "ERROR", "Error" or any combination of upper and lower case characters, and Instr appears to be case-sensitive. Now I know that I can cheat by doings something like this:
temp$=upper$(desc2$) If (Instr(temp$,"ERROR")<>0) Then.....
but wonder if there is a more efficient way as I have to do this a lot of times!
Thanks.