Case insensitive search not working at FindString [invalid]
Posted: Sun Sep 03, 2017 12:58 pm
Edit: As Little John mentioned, Mode is the 4th parameter, so correct code would be: FindString("PureBasic", "BAS", 0, #PB_String_NoCase)
According to the manual FindString's optional parameter "Mode" allows to do a case insensitive search with #PB_String_NoCase: https://www.purebasic.com/documentation ... tring.html
However, the following code
outputs
So Debug FindString("PureBasic", "BAS", #PB_String_NoCase) prints out 0 where it should print out 5.
According to the manual FindString's optional parameter "Mode" allows to do a case insensitive search with #PB_String_NoCase: https://www.purebasic.com/documentation ... tring.html
However, the following code
Code: Select all
Debug FindString("PureBasic", "Bas")
Debug FindString("PureBasic", "BAS")
Debug ""
Debug FindString("PureBasic", "Bas", #PB_String_CaseSensitive)
Debug FindString("PureBasic", "BAS", #PB_String_CaseSensitive)
Debug ""
Debug FindString("PureBasic", "Bas", #PB_String_NoCase)
Debug FindString("PureBasic", "BAS", #PB_String_NoCase)
Code: Select all
5
0
5
0
5
0