Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / string comparison

Author
Message
HKlown
21
Years of Service
User Offline
Joined: 18th Jan 2003
Location: United States
Posted: 8th Mar 2003 20:07
is string comparison ("if str1$=str2$") case-sensitive? If it's not, is there any way to do case sensitive comparison? I know that in VB there's the IsLike() function, but I dont' know about darkBasic.

thanks
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 8th Mar 2003 20:26
if lower$(str1$)=lower$(str2$)

it returns the dtring in lower case letters. "upper$()" does the same but in upper case letters.

Yum! Yum! Yum! Yum!
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Mar 2003 22:29
What Hamish means is that string comparison is case-sensitive, but that by using upper$() or lower$() you can get a case insensitive comparison

Login to post a reply

Server time is: 2024-11-24 04:05:45
Your offset time is: 2024-11-24 04:05:45