Page 1 of 1

FindString ignoring #PB_StringNoCase

Posted: Mon Sep 12, 2016 10:22 am
by SparrowhawkMMU
Case insensitive searching appears broken

Code:

Code: Select all

Define a$ = "Hello World"

Debug "world: " + Str(FindString(a$, "world", #PB_String_NoCase))
Debug "World: " + Str(FindString(a$, "World", #PB_String_NoCase))
Output:

Code: Select all

world: 0
World: 7
SpiderBasic 1.40 on OS X 10.11.6

NOTE: This is also happening in PureBasic (5.50) , i.e. the same output is shown. Have I misunderstood the flag or is this a bug in both tools?

Re: FindString ignoring #PB_StringNoCase

Posted: Mon Sep 12, 2016 11:31 am
by Peter
Position = FindString(String$, StringToFind$ [, StartPosition [, Mode]])

;-)

Re: FindString ignoring #PB_StringNoCase

Posted: Mon Sep 12, 2016 3:37 pm
by SparrowhawkMMU
Damn, that's embarrassing! :D

MUST. LEARN. TO. READ. MANUAL !

Thanks Peter.