[Implemented] FindString needs a "Case" flag

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

[Implemented] FindString needs a "Case" flag

Post by BackupUser »

Restored from previous forum. Originally posted by PB.

So we can search with case sensitivity on or off. Thanks!


PB - Registered PureBasic Coder
BackupUser
PureBasic Guru
PureBasic Guru
Posts: 16777133
Joined: Tue Apr 22, 2003 7:42 pm

Post by BackupUser »

Restored from previous forum. Originally posted by Paul.

Nice idea, and for those who want a workaround for now...

Code: Select all

text.s="We will Search This Text Now"
 
;pos=FindString(text,"this",1)              ;normal case sensitive search
pos=FindString(UCase(text),UCase("this"),1) ;case insensitive search
 
If pos
  MessageRequester("Found",Mid(text,pos,Len(text)),0)
EndIf 
Post Reply